Qt tombstone bugs
Infrastructure bits: Qt tombstone uses a short buffer; make sure that the plname value fits instead of relying on snprintf() to truncate it. A warning about gold, if any, was iffy but this should guarantee no reason for future complaint. Year was safe but a compiler sensitive to buffer overflows wouldn't know that. Actual bugs: Qt used money in inventory for gold amount on tombstone; that overlooks gold in containers and will be 0 by tombstone stage if bones get saved. Year was recalculated from current date+time instead of using the value that gets passed in--blindly flagging that variable as UNUSED was a mistake.
This commit is contained in:
@@ -105,7 +105,7 @@ extern void curses_number_pad(int state);
|
||||
extern void curses_delay_output(void);
|
||||
extern void curses_start_screen(void);
|
||||
extern void curses_end_screen(void);
|
||||
extern void curses_outrip(winid wid, int how);
|
||||
extern void curses_outrip(winid wid, int how, time_t when);
|
||||
extern void genl_outrip(winid tmpwin, int how, time_t when);
|
||||
extern void curses_preference_update(const char *pref);
|
||||
extern void curs_reset_windows(boolean, boolean);
|
||||
|
||||
Reference in New Issue
Block a user