mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Undead: be a bit more careful about sprintf buffer sizes
This commit is contained in:
4
undead.c
4
undead.c
@ -2429,7 +2429,7 @@ static void draw_monster(drawing *dr, game_drawstate *ds, int x, int y,
|
|||||||
static void draw_monster_count(drawing *dr, game_drawstate *ds,
|
static void draw_monster_count(drawing *dr, game_drawstate *ds,
|
||||||
const game_state *state, int c, bool hflash) {
|
const game_state *state, int c, bool hflash) {
|
||||||
int dx,dy;
|
int dx,dy;
|
||||||
char buf[8];
|
char buf[MAX_DIGITS(int) + 1];
|
||||||
char bufm[8];
|
char bufm[8];
|
||||||
|
|
||||||
dy = TILESIZE/4;
|
dy = TILESIZE/4;
|
||||||
@ -2474,7 +2474,7 @@ static void draw_path_hint(drawing *dr, game_drawstate *ds,
|
|||||||
const struct game_params *params,
|
const struct game_params *params,
|
||||||
int hint_index, bool hflash, int hint) {
|
int hint_index, bool hflash, int hint) {
|
||||||
int x, y, color, dx, dy, text_dx, text_dy, text_size;
|
int x, y, color, dx, dy, text_dx, text_dy, text_size;
|
||||||
char buf[4];
|
char buf[MAX_DIGITS(int) + 1];
|
||||||
|
|
||||||
if (ds->hint_errors[hint_index])
|
if (ds->hint_errors[hint_index])
|
||||||
color = COL_ERROR;
|
color = COL_ERROR;
|
||||||
|
Reference in New Issue
Block a user