Crash Bug: saving design with different capitalization

(this was reported under a different thread but I figure you’d like one bug per thread and details)

Crashes when trying to save design with the same name but different capitalization. (edit: it appears the important thing is the FILE name, not the design name per se)

Error message:
"
Ship design not found -> C:\Users(username)\Documents/My Games/GratuitousSpaceBattles/ships/HAWK-FS MK I.txt:…\src\SIM_ShipDesign.cpp 441
"
Steps to reproduce:

  1. start game

  2. ship design

  3. name design “HAWK-FS MK I” (or whatever, that’s just what I used)

  4. save design

  5. it will change it to all lower case, change name back to upper case

  6. error message, crash

Notes:

  • after the crash and reloading the game, I loaded the design and it had the correctly capitalized name, but if I saved it again (which works as long as I don’t fiddle with the file name) it changes the design name to lower case on the display, and saving it yet again in that state will really make the design name lower case

This becomes quite annoying combined with the bug where the save name becomes lowercase…

Because you save a ship with uppercase letters, go to edit it again, save, and suddenly you have two versions with different capitalization and you crash.

I just use all lowercase names for now. It’ll get fixed.