Commit graph

11 commits

Author SHA1 Message Date
John "Elwin" Edwards
3dfd8fd09b Advanced Rogue family: fix some potential buffer overflows.
Some code for determining the score file location assumed that PATH_MAX
would be less than 1024, which cannot be guaranteed.

Advanced Rogue 5 and 7, and XRogue, have had the buffers for the file
name enlarged.  UltraRogue never called the functions, so the code has
been deleted instead.
2021-05-03 19:05:37 -04:00
John "Elwin" Edwards
6c3cd116ff Fix many compiler warnings.
There should only be two changes in behavior:

arogue7/fight.c, arogue7/fight.c: a to-hit bonus is now correctly
applied to characters who are not monks instead of monks who are not
empty-handed.

urogue/fight.c: fixed an interaction with the "debug" macro that could
cause the wrong message to be displayed.
2021-04-14 18:55:33 -04:00
John "Elwin" Edwards
338214459d Fix a portability issue with md_hasclreol().
Some games' implementation of md_hasclreol() poked around in ncurses
internals, which does not work for some ncurses build configuration.
Most games did not actually call md_hasclreol(), so it was removed.
There is a standard terminfo function which can retrieve the value of
the clr_eol capability, so this was used for rogue5.
2017-12-27 10:26:06 -05:00
John "Elwin" Edwards
79765ae3b2 UltraRogue: don't swap signal handlers.
In md_shellescape(), signal handlers for SIGINT and SIGQUIT were saved
and restored, but exchanged in the process.  This was fixed in the
other games by commit 600873555ec0.

Deleting md_shellescape() might have been a better fix.  It is
apparently unused.
2017-09-29 21:21:50 -04:00
John "Elwin" Edwards
614dcfffd2 Fix more header-related warnings.
This fixes all current default warnings with GCC7 on Linux.  That does
not mean the code is anywhere close to clean.
2017-09-22 16:24:40 -04:00
John "Elwin" Edwards
90d5708d84 Fix a few more compiler warnings. 2017-09-18 19:36:14 -04:00
John "Elwin" Edwards
0936c8f216 Excise md_putchar().
The function wrapped the standard putchar(), doing nothing beside
discarding the return value.  That could cause problems with tputs(),
which expects an int to be returned.
2017-09-18 19:11:57 -04:00
John "Elwin" Edwards
e3c596c443 UltraRogue: begin autoconfiscation.
Build options can now be set with configure.
2017-09-04 21:08:09 -04:00
John "Elwin" Edwards
6c46840eab UltraRogue: add the autosave feature.
UltraRogue now automatically saves the game when SIGHUP or SIGTERM is
received.
2017-09-03 19:58:22 -04:00
John "Elwin" Edwards
9a9c016bae UltraRogue: check the return value from getpwuid().
It is possible for getpwuid() to return NULL.  Such a failure will no
longer cause a segfault.  However, the call to getpwuid() may normally
not be reachable.
2017-03-01 20:40:18 -05:00
John "Elwin" Edwards
11c74c273d Import UltraRogue from the Roguelike Restoration Project (r1490) 2017-01-31 19:56:04 -05:00