summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 5e1ae9e..3d61f42 100644
--- a/src/main.c
+++ b/src/main.c
@@ -3546,7 +3546,11 @@ int main(int argc, char *argv[])
if (sdl_mod&(KMOD_CAPS))
strappend(uitext, " [CAP LOCKS]");
if (GRID_MODE)
- sprintf(uitext, "%s [GRID: %d]", uitext, GRID_MODE); //TODO: Undefined behavior: variable is used as parameter and destination in sprintf().
+ {
+ char gridtext[15];
+ sprintf(gridtext, " [GRID: %d]", GRID_MODE);
+ strappend(uitext, gridtext);
+ }
#ifdef INTERNAL
if (vs)
strappend(uitext, " [FRAME CAPTURE]");