Walter Landry <[email protected]> writes:

> When running the game, saving and then reloading, I sometimes get a segfault.
> I managed to track down the problem.  Rogue's objects use a const char* to
> represent damage (e.g. "1d3").  The pointer to this string gets saved in the
> savefile, but not the string itself.  When the program is run again, the
> pointer is no longer valid, leading to segfaults.

Thanks for the helpful report!  I appreciate your fix suggestion, but
would prefer to patch the loading code to reconstruct obj->damage from
obj->kind, which uniquely determines it AFAICT; I'll take care of that
when I get a chance.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/[email protected]


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to