Silence a false positive compiler warning

Potential overflow which cannot happen, since the integer
ranger here is just a handful of dB, nowhere near INT_MAX.
This commit is contained in:
Robin Gareus 2022-11-01 01:24:31 +01:00
parent 6730cfe13e
commit d19b12c283
No known key found for this signature in database
GPG Key ID: A090BCE02CF57F04
1 changed files with 3 additions and 3 deletions

View File

@ -1757,10 +1757,10 @@ static void draw_grid (Fil4UI* ui) {
GRID_DB_DOT(-i);
break;
}
char txt[8];
snprintf (txt, 8, "%+d", i);
char txt[16];
snprintf (txt, sizeof(txt), "%+d", i);
GRID_DB(i, txt);
snprintf (txt, 8, "%+d", -i);
snprintf (txt, sizeof(txt), "%+d", -i);
GRID_DB(-i, txt);
}