Skip to content

Commit 1b24b1b

Browse files
committed
f_finale.c: Fix format-overflow warning.
GCC thinks `stage` may be < 0, and as such overflow `name`.
1 parent 656a444 commit 1b24b1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prboom2/src/f_finale.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ void F_BunnyScroll (void)
825825
laststage = stage;
826826
}
827827

828-
sprintf (name,"END%i",stage);
828+
snprintf(name, sizeof name, "END%i", stage);
829829
// CPhipps - patch drawing updated
830830
V_DrawNamePatch((320-13*8)/2, (200-8*8)/2, 0, name, CR_DEFAULT, VPT_STRETCH);
831831
}

0 commit comments

Comments
 (0)