Merge pull request #77 from JaapHaitsma/warning-fix

Fix compiler warning
This commit is contained in:
Alexandre Perrin 2020-05-20 09:02:14 +02:00 committed by GitHub
commit 744372e551
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -150,7 +150,7 @@ static void draw_grid(SDL_Surface *screen, struct quirc *q, int index)
for (i = 0; i < 3; i++) {
struct quirc_capstone *cap = &q->capstones[qr->caps[i]];
char buf[8];
char buf[16];
snprintf(buf, sizeof(buf), "%d.%c", index, "ABC"[i]);
stringColor(screen, cap->center.x, cap->center.y, buf,