[flagged]
To u/db48x whose post got flagged and doesn't reappear despite me vouching for it as I think they have a point (at least for modern games): GTA San Andreas was released in 2004. Back then, YAML was in its infancy (2001) and JSON was only standardized informally in 2006, and XML wasn't something widely used outside of the Java world. On top of that, the hardware requirements (256MB of system RAM, and the PlayStation 2…
How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
31–40 of 315 posts
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#32Earlier quoted context omitted.
To u/db48x whose post got flagged and doesn't reappear despite me vouching for it as I think they have a point (at least for modern games): GTA San Andreas was released in 2004. Back then, YAML was in its infancy (2001) and JSON was only standardized informally in 2006, and XML wasn't something widely used outside of the Java world. On top of that, the hardware requirements (256MB of system RAM, and the PlayStation 2…
The comment reappeared, and while you're right about using proper libraries to handle data, it doesn't excuse the "undefined behavior (uninitialized local variables)" that I still see all the time despite all the warning and error flags that can be fed to the compiler. Most of the time, the programmers who do this do not follow the simple rule that Stroustrup said which is to define or initialize a variable where you…
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#33Earlier quoted context omitted.
Putting the (very valid) reasons for not having human-readable game saves aside, are you sure it's worse than using a 3rd party library that's built to accept semi-valid input values, possibly evaluates user input in some way and has difficult to debug bugs that occur only under certain inputs? I agree that writing a stable and safe parser for a binary data file isn't easy, but there's less things that can go wrong w…
> Putting the (very valid) reasons for not having human-readable game saves aside, I don't follow. What would the reasons be?
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#34Earlier quoted context omitted.
To u/db48x whose post got flagged and doesn't reappear despite me vouching for it as I think they have a point (at least for modern games): GTA San Andreas was released in 2004. Back then, YAML was in its infancy (2001) and JSON was only standardized informally in 2006, and XML wasn't something widely used outside of the Java world. On top of that, the hardware requirements (256MB of system RAM, and the PlayStation 2…
You’re not entirely wrong, but a library doesn’t have to be “heavyweight” in order to be bulletproof. And you can load the library during startup and then unload it after; it doesn’t have to stick around for the whole run time of the game. Modern OSes will reclaim the pages after you stop using them, if there is memory pressure. Of course the PS2 didn’t do that I am sure.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#35[flagged]
Putting the (very valid) reasons for not having human-readable game saves aside, are you sure it's worse than using a 3rd party library that's built to accept semi-valid input values, possibly evaluates user input in some way and has difficult to debug bugs that occur only under certain inputs? I agree that writing a stable and safe parser for a binary data file isn't easy, but there's less things that can go wrong w…
If you don't know what “good” looks like, take a look at [Serde](https://serde.rs/). It’s for Rust, but its features and overall design are something you should attempt to approach no matter what language you’re writing in.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#36Earlier quoted context omitted.
And it did not matter at all. The game shipped and was a success.
This is the thing that drives artists and craftsmen to despair and drink: That a flawed, buggy, poor quality work can be "successful" while something beautiful and technically perfect can fail.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#37Earlier quoted context omitted.
To u/db48x whose post got flagged and doesn't reappear despite me vouching for it as I think they have a point (at least for modern games): GTA San Andreas was released in 2004. Back then, YAML was in its infancy (2001) and JSON was only standardized informally in 2006, and XML wasn't something widely used outside of the Java world. On top of that, the hardware requirements (256MB of system RAM, and the PlayStation 2…
The flaw isn't the language. The issue is a 0.5x programmer not knowing to avoid sscanf() and failing to default and validate the results. This could be handled competently with strtok() parsing the lines without needing a more complicated file format.
To be honest, I just don't like how you disparaged the programmer out-of-context. Talk is cheap.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#38Earlier quoted context omitted.
Putting the (very valid) reasons for not having human-readable game saves aside, are you sure it's worse than using a 3rd party library that's built to accept semi-valid input values, possibly evaluates user input in some way and has difficult to debug bugs that occur only under certain inputs? I agree that writing a stable and safe parser for a binary data file isn't easy, but there's less things that can go wrong w…
> Putting the (very valid) reasons for not having human-readable game saves aside, I don't follow. What would the reasons be?
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#39Earlier quoted context omitted.
Putting the (very valid) reasons for not having human-readable game saves aside, are you sure it's worse than using a 3rd party library that's built to accept semi-valid input values, possibly evaluates user input in some way and has difficult to debug bugs that occur only under certain inputs? I agree that writing a stable and safe parser for a binary data file isn't easy, but there's less things that can go wrong w…
> Putting the (very valid) reasons for not having human-readable game saves aside, I don't follow. What would the reasons be?
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#40Earlier quoted context omitted.
The comment reappeared, and while you're right about using proper libraries to handle data, it doesn't excuse the "undefined behavior (uninitialized local variables)" that I still see all the time despite all the warning and error flags that can be fed to the compiler. Most of the time, the programmers who do this do not follow the simple rule that Stroustrup said which is to define or initialize a variable where you…
While it doesn't excuse the bad habits, we do have to keep in mind C++98 (or whatever more ancient was used back then) didn't have the simple initializers we now take for granted. You couldn't just do 'Type myStruct = {};' to null-initialize it, you had to manually NULL all nested fields. God forbid you change the order of the variables in the struct if you're nesting them and forget to update it everywhere. It was j…