early-roguelike/rogue3
John "Elwin" Edwards 082cd54126 Fix some terribly depressing corruption during restore.
In rogue5/state.c, rs_read_daemons() zeroes out the argument and delay
if the daemon slot is empty.  Unfortunately that code ended up on the
wrong side of the brace that closes the for loop, so instead of running
after each daemon, it got run once after the loop exited, when the
index was of course out of bounds.

This tended to manifest, when compiled with -O2, by overwriting hw and
setting it to NULL.  When inventory() next ran, hw would be passed to
wgetch(), which returns ERR when it gets a NULL argument.  This made
md_readchar() think something was wrong and autosave the game.

Upon investigation, rogue3 was found to commit the same mistake.
rogue4 and srogue don't zero the data.  arogue5 already does it
properly.

Someday I am going to run all this through Valgrind.  Someday when I
am a kinder person who will not be driven to invoke hordes of trolls
and centaurs upon the original authors.
2014-01-08 16:44:16 -05:00
..
acinclude.m4 rogue3: begin porting to autoconf. 2013-08-24 13:36:13 -07:00
armor.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
chase.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
command.c rogue3, srogue: showing the version should not take a turn. 2012-05-24 05:10:38 +00:00
configure.ac rogue3: add install and uninstall targets to Makefile. 2013-08-25 19:52:23 -07:00
daemon.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
daemons.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
fight.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
init.c Ask about unidentified objects by default 2009-10-16 14:21:24 +00:00
install-sh rogue3: begin porting to autoconf. 2013-08-24 13:36:13 -07:00
INSTALL.txt Update some of the documentation. 2013-09-04 09:01:44 -07:00
io.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
LICENSE.TXT Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
list.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
machdep.h rogue3: begin porting to autoconf. 2013-08-24 13:36:13 -07:00
main.c Make sure file_name contains '/' between SAVEDIR and the file name. 2013-08-27 22:25:40 -07:00
Makefile.in rogue3: set missing Makefile variables. 2013-08-25 21:31:22 -07:00
mdport.c rogue[345]: fix backspace key in prompts. 2013-08-27 09:25:30 -07:00
mdport.h Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
misc.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
monsters.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
move.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
newlevel.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
options.c Prevent changing name or save file when using system savedir 2009-10-14 11:21:33 +00:00
pack.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
passages.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
potions.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
readme36.html Update the documentation 2009-10-24 14:12:26 +00:00
rings.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
rip.c rogue3, rogue4: fix log message formatting for wins. 2012-08-07 21:17:29 +00:00
rogue.6.in Update some of the documentation. 2013-09-04 09:01:44 -07:00
rogue.h rogue3: make LOGFILE work with SAVEDIR 2009-11-11 02:41:47 +00:00
rogue.r.in rogue3: begin porting to autoconf. 2013-08-24 13:36:13 -07:00
rogue36.cat Update the documentation 2009-10-24 14:12:26 +00:00
rogue36.doc Further updates to the documentation 2009-10-24 14:21:15 +00:00
rogue36.html Further updates to the documentation 2009-10-24 14:21:15 +00:00
rogue36.sln Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
rogue36.vcproj Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
rooms.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
save.c Refuse to restore if the character is dead. 2013-08-09 09:34:07 -07:00
scrolls.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
state.c Fix some terribly depressing corruption during restore. 2014-01-08 16:44:16 -05:00
sticks.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
things.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
vers.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
weapons.c rogue3: short bows should not be called int bows. 2013-08-24 13:50:15 -07:00
wizard.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00
xcrypt.c Import Rogue 3.6 from the Roguelike Restoration Project (r1490) 2009-10-13 13:33:34 +00:00