Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRF StringCode 1F does not allow 00 values #6650

Closed
DorpsGek opened this issue Jan 3, 2018 · 4 comments
Closed

GRF StringCode 1F does not allow 00 values #6650

DorpsGek opened this issue Jan 3, 2018 · 4 comments
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Jan 3, 2018

Borg opened the ticket and wrote:

There is bug in GRF StringCodes handling.
Code '1F ' does not handle 00 values
right. If you specify X or Y as 00, string not displayed (if early codes)
or its cut because GRF things it end of string.

Reported version: 1.7.2
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6650
@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 4, 2018

frosch wrote:

What's the point of this?
* The behaviour of 0x00 is defined in the specification, 0x00 is not allowed.
* Both control codes 0x01 and 0x1F have been removed from OpenTTD since 2013.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6650#comment14821

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 4, 2018

frosch closed the ticket.

Reason for closing: Invalid


This comment was imported from FlySpray: https://bugs.openttd.org/task/6650

@DorpsGek DorpsGek closed this as completed Jan 4, 2018
@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 4, 2018

Borg wrote:

Thats interesting what you say, because 1F works pefectly.
I tested it few days ago on DOxx messages. I put 1F 01 04 and text was shifted exacly by x=1,y=4
Im running OpenTTD 1.7.2
Recheck it? shall I RTFS?


This comment was imported from FlySpray: https://bugs.openttd.org/task/6650#comment14822

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 5, 2018

Borg wrote:

Okey, I did RTFS.. and indeed its removed.
Case closed. I did 1 1 at first so I was misleaded.

case 0x1F:
if (str[0] == '\0' || str[1] == '\0') goto string_end;
d += Utf8Encode(d, ' ');
str += 2;
break;


This comment was imported from FlySpray: https://bugs.openttd.org/task/6650#comment14823

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) component: NewGRF This issue is related to NewGRFs bug labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant