Fix gcc sprintf warnings
Gcc 9 has become more vocal with sprintf buffer overflow checking. Remove these sprintf warnings by changing the offending calls to a snprintf wrapper that will explicitly check the result.
This commit is contained in:
@@ -3537,8 +3537,8 @@ boolean printdun;
|
||||
(void) strsubst(tmpbuf, " herself", " yourself");
|
||||
(void) strsubst(tmpbuf, " his ", " your ");
|
||||
(void) strsubst(tmpbuf, " her ", " your ");
|
||||
Sprintf(buf, "%s%syou, %s%c", PREFIX, TAB, tmpbuf,
|
||||
--kncnt ? ',' : '.');
|
||||
Snprintf(buf, sizeof(buf), "%s%syou, %s%c", PREFIX, TAB,
|
||||
tmpbuf, --kncnt ? ',' : '.');
|
||||
putstr(win, 0, buf);
|
||||
}
|
||||
for (bp = mptr->final_resting_place; bp; bp = bp->next) {
|
||||
|
||||
Reference in New Issue
Block a user