rmtew / incursion-roguelike

The legendary computer game Incursion: Hall of the Goblin King!
https://incursion-roguelike.net/
Other
7 stars 1 forks source link

isspace and family assert on negative values #30

Closed rmtew closed 2 months ago

rmtew commented 2 months ago

Reproduction:

  1. Debug Incursion.
  2. Create a new character. Select the first option out of every choice until in game.
  3. Press '<' to ascend.
  4. Enter the inn, 'i'.
  5. Press 'd' to descend.
  6. Press escape then quit the game.
  7. Observe that a literal finally hits isspace.
    Incursion.exe!_chvalidator(int c, int mask) Line 36 C++
    Incursion.exe!fast_check_initial_locale(const int c, const int mask) Line 26    C++
    Incursion.exe!fast_check_current_locale(const int c, const int mask) Line 33    C++
>   Incursion.exe!isspace(int c) Line 148   C++
    Incursion.exe!String::Trim() Line 311   C++
    Incursion.exe!Detable(const char * _s, char mode) Line 1271 C++
    Incursion.exe!TextTerm::CreateCharDump(String & str) Line 1316  C++
    Incursion.exe!TextTerm::DumpCharacter(String & filebase) Line 1394  C++
    Incursion.exe!Player::Gravestone() Line 2270    C++
    Incursion.exe!Game::Play() Line 423 C++
    Incursion.exe!Game::StartMenu() Line 2147   C++
    Incursion.exe!main(int argc, char * * argv) Line 377    C++
    [External Code] 
HexDecimal commented 2 months ago

Fixed by PR #29