More futureproofing hypotheticals

If you set COLNO larger than BUFSZ, few places cause a buffer overrun.
Add a new buffer size definition, COLBUFSZ, which is the larger of
COLNO and BUFSZ, used in places that care about a screen-wide string.
This commit is contained in:
Pasi Kallinen
2020-12-20 12:23:09 +02:00
parent 4cf6727b4e
commit 957990c14d
4 changed files with 10 additions and 3 deletions

View File

@@ -1330,7 +1330,7 @@ wiz_map_levltyp(VOID_ARGS)
}
{
char dsc[BUFSZ];
char dsc[COLBUFSZ];
s_level *slev = Is_special(&u.uz);
Sprintf(dsc, "D:%d,L:%d", u.uz.dnum, u.uz.dlevel);