early-roguelike/srogue
John "Elwin" Edwards ab25967717 Fix potential segfaults at restore related to ctime().
In some games, restore() passes the result of ctime() to mvprintw() or
some other variadic message-formatting function.  If ctime() has not
been declared properly, its return type is inferred to be int instead
of char *.  This does not cause a warning because the compiler does not
know the correct type of variadic arguments.

On platforms where ints and pointers are not the same size, this can,
probably depending on alignment, result in a segfault that is not easy
to trace.

Including time.h fixes the problem.  Some games manually declared
ctime() and avoided the bug.  These declarations have also been
replaced with the include.
2017-09-15 20:51:10 -04:00
..
acinclude.m4 srogue: begin porting to autoconf. 2013-09-01 20:50:52 -07:00
armor.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
bob.h Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490) 2010-11-25 12:21:41 +00:00
bsdtty.c Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490) 2010-11-25 12:21:41 +00:00
chase.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
command.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
configure.ac Remove an extra bracket from some Autoconf macros. 2017-09-10 17:30:13 -04:00
cx.h Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490) 2010-11-25 12:21:41 +00:00
daemon.c Daemons and fuses now return void. 2016-03-05 20:49:37 -05:00
daemons.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
disply.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
encumb.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
fight.c Rogue V[345], Super-Rogue: Fix violet fungi/venus flytraps. 2016-05-01 19:39:56 -04:00
global.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
init.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
io.c Fix potential segfaults at restore related to ctime(). 2017-09-15 20:51:10 -04:00
LICENSE.TXT Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490) 2010-11-25 12:21:41 +00:00
list.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
main.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
Makefile.in Makefiles: don't rely on built-in implicit rules. 2016-03-08 19:45:41 -05:00
makevers.c Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490) 2010-11-25 12:21:41 +00:00
mdport.c Use more portable random seed generation. 2017-01-28 15:49:41 -05:00
misc.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
monsters.c Rogue V[345], Super-Rogue: Fix violet fungi/venus flytraps. 2016-05-01 19:39:56 -04:00
move.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
ncx.h Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490) 2010-11-25 12:21:41 +00:00
new_leve.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
newterm.c Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490) 2010-11-25 12:21:41 +00:00
options.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
pack.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
passages.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
potions.c Fix the perpetual haste cheat. 2017-01-28 11:45:36 -05:00
pstats.c Fix the perpetual haste cheat. 2017-01-28 11:45:36 -05:00
rdk.h Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490) 2010-11-25 12:21:41 +00:00
rgdata.c Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490) 2010-11-25 12:21:41 +00:00
rings.c Fix the perpetual haste cheat. 2017-01-28 11:45:36 -05:00
rip.c Fix potential segfaults at restore related to ctime(). 2017-09-15 20:51:10 -04:00
rogue.ext Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
rogue.h Use more portable random seed generation. 2017-01-28 15:49:41 -05:00
rogue.nr Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490) 2010-11-25 12:21:41 +00:00
rooms.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
save.c Fix potential segfaults at restore related to ctime(). 2017-09-15 20:51:10 -04:00
scrolls.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
srogue.vcxproj Enable the logfile on 64-bit Windows. 2016-05-17 21:28:34 -04:00
srogue.vcxproj.filters Update the Visual Studio project files. 2015-08-18 13:23:56 -04:00
state.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
sticks.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
things.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
trader.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
vers.c Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490) 2010-11-25 12:21:41 +00:00
weapons.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
wizard.c Super-Rogue: convert to ANSI-style function declarations. 2016-01-31 13:45:07 -05:00
xcrypt.c srogue: more compatibility improvements. 2014-05-03 10:31:30 -07:00