The pointer could go out of bounds when decremented if it was pointing at the start of the status_vals[BL_HUNGER] (empty string). Also, guard tty_status_update() from an out of range index being passed to it (botl shouldn't do that, but...). The legal 1st parameter values for tty_status_update() in 3.6.2 are BL_RESET (-2) BL_FLUSH (-1) BL_TITLE ( 0) ...though to... BL_CONDITION (22) count MAXBLSTATS = (BL_CONDITION + 1) There's a BL_CHARACTERISTIC (-3) defined in the botl.h header file, but it is not used in wintty.c and is now screened out along with everything lower and everything MAXBLSTATS and above. closes #142 fixes #141
14 KiB
14 KiB