diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-02-18 21:26:38 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-02-18 21:26:38 +0000 |
| commit | 448095ede815b1a63ddedc602c3ac768a0d52968 (patch) | |
| tree | 0468b5e1487d2f52e28e647a02e7bc1118fdafe3 | |
| parent | fccd2a55e705a991f22f1aa393c9324846d80515 (diff) | |
| download | puzzles-448095ede815b1a63ddedc602c3ac768a0d52968.zip puzzles-448095ede815b1a63ddedc602c3ac768a0d52968.tar.gz puzzles-448095ede815b1a63ddedc602c3ac768a0d52968.tar.bz2 puzzles-448095ede815b1a63ddedc602c3ac768a0d52968.tar.xz | |
Undead: be a bit more careful about sprintf buffer sizes
| -rw-r--r-- | undead.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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, const game_state *state, int c, bool hflash) { int dx,dy; - char buf[8]; + char buf[MAX_DIGITS(int) + 1]; char bufm[8]; dy = TILESIZE/4; @@ -2474,7 +2474,7 @@ static void draw_path_hint(drawing *dr, game_drawstate *ds, const struct game_params *params, int hint_index, bool hflash, int hint) { 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]) color = COL_ERROR; |