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:
@@ -898,12 +898,13 @@ curses_end_screen()
|
||||
|
||||
/*
|
||||
outrip(winid, int)
|
||||
-- The tombstone code. If you want the traditional code use
|
||||
genl_outrip for the value and check the #if in rip.c.
|
||||
-- The tombstone code. We use genl_outrip() from rip.c
|
||||
instead of rolling our own.
|
||||
*/
|
||||
void
|
||||
curses_outrip(winid wid UNUSED,
|
||||
int how UNUSED)
|
||||
int how UNUSED,
|
||||
time_t when UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user