calref / cboe

Classic Blades of Exile
http://spiderwebforums.ipbhost.com/index.php?/forum/12-blades-of-exile/
Other
173 stars 42 forks source link

Fix save game filename newline bug on Linux. #185

Closed seisatsu closed 6 years ago

seisatsu commented 6 years ago

Checks if there is a newline at the end of fname before examining the file extension. Otherwise in addition to the unwanted newline, the logic catches at fname.substr(dot) != ".exg" (now on line 404) and an additional ".exg" is added to the end of the filename.

CelticMinstrel commented 6 years ago

Thanks for trying to help, but I don't think this is the proper fix. If I recall correctly, the newline is due to improperly parsing zenity' output (which is why it's Linux-specific), so if that were fixed the newline would simply go away and we wouldn't need to worry about it in this part of the code.

The code hooking into zenity should be in the winutil file if you want to take a look.