Attnam / ivan

Iter Vehemens ad Necem - a continuation of the graphical roguelike by members of http://attnam.com
GNU General Public License v2.0
306 stars 42 forks source link

developer console broken by string corruption? #583

Open AquariusPower opened 4 years ago

AquariusPower commented 4 years ago

run ivan with a debugger (like nemiver), load a game then: open the dev console with Ctrl+` type: help and hit enter

devcons.cpp at

362   DEVCMDMSG("Trying to run: %s ('%s' '%s')",strFullCmd.c_str(),strCmd.c_str(),strParams.c_str());

They evaluate correctly at that line above as: strFullCmd="help" strCmd="help" strParams=""

but crashes with: Selection_008 looks like from ::AddMessage() to __IO_vsprintf something breaks 2 strings that become "\?\?UUU" and at that point I have absolutely no idea anymore, what could be happening?

red-kangaroo commented 4 years ago

Isn't there some conversion from festring to char? I think I've seen similarly messed up strings when I had a festring and tried to convert it to char without using the CChar() method.

AquariusPower commented 4 years ago

mmm... it is using std::string and not festring!!! let me try something..