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:
@@ -370,6 +370,13 @@ struct savefile_info {
|
||||
#define TBUFSZ 300 /* g.toplines[] buffer max msg: 3 81char names */
|
||||
/* plus longest prefix plus a few extra words */
|
||||
|
||||
/* COLBUFSZ is the larger of BUFSZ and COLNO */
|
||||
#if BUFSZ > COLNO
|
||||
#define COLBUFSZ BUFSZ
|
||||
#else
|
||||
#define COLBUFSZ COLNO
|
||||
#endif
|
||||
|
||||
#define PL_NSIZ 32 /* name of player, ghost, shopkeeper */
|
||||
#define PL_CSIZ 32 /* sizeof pl_character */
|
||||
#define PL_FSIZ 32 /* fruit name */
|
||||
|
||||
Reference in New Issue
Block a user