early-roguelike/arogue5
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 arogue5: port to autoconf. 2013-08-31 09:18:07 -07:00
arogue5.vcxproj Enable the logfile on 64-bit Windows. 2016-05-17 21:28:34 -04:00
arogue5.vcxproj.filters Update the Visual Studio project files. 2015-08-18 13:23:56 -04:00
arogue58.doc Import Advanced Rogue 5.8 from the Roguelike Restoration Project (r1490) 2012-08-09 22:58:48 +00:00
arogue58.html Import Advanced Rogue 5.8 from the Roguelike Restoration Project (r1490) 2012-08-09 22:58:48 +00:00
chase.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
command.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
configure.ac Remove an extra bracket from some Autoconf macros. 2017-09-10 17:30:13 -04:00
daemon.c Daemons and fuses now return void. 2016-03-05 20:49:37 -05:00
daemons.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
encumb.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
fight.c Declare some function arguments as const. 2016-03-06 19:32:47 -05:00
init.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
io.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
LICENSE.TXT Import Advanced Rogue 5.8 from the Roguelike Restoration Project (r1490) 2012-08-09 22:58:48 +00:00
list.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
mach_dep.h arogue5: port to autoconf. 2013-08-31 09:18:07 -07: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
maze.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
mdport.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
misc.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
monsters.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
move.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
network.h Import Advanced Rogue 5.8 from the Roguelike Restoration Project (r1490) 2012-08-09 22:58:48 +00:00
new_level.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
options.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
outside.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
pack.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
passages.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
player.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
potions.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
rings.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
rip.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
rogue.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
rogue.h Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
rooms.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
save.c Fix potential segfaults at restore related to ctime(). 2017-09-15 20:51:10 -04:00
scrolls.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
state.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
sticks.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
things.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
trader.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
util.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
vers.c Import Advanced Rogue 5.8 from the Roguelike Restoration Project (r1490) 2012-08-09 22:58:48 +00:00
weapons.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
wear.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
wizard.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00
xcrypt.c Advanced Rogue 5: convert to ANSI function declarations. 2016-02-07 14:39:21 -05:00