summaryrefslogtreecommitdiff
path: root/test/glpuzzle.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-26 16:12:18 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-26 16:12:18 +0200
commit2ffd4e4f1af16b17a286ff354603a717f5d828a5 (patch)
tree99e2d4a7e2fde8e3abb027eb687901440750ee00 /test/glpuzzle.cxx
parent53d9614adbb728fc4db983c9bb817c6eea870994 (diff)
Replace all calls to sprintf() by calls to snprintf().
Diffstat (limited to 'test/glpuzzle.cxx')
-rw-r--r--test/glpuzzle.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/glpuzzle.cxx b/test/glpuzzle.cxx
index d966ced01..1c1f8b4e4 100644
--- a/test/glpuzzle.cxx
+++ b/test/glpuzzle.cxx
@@ -491,7 +491,7 @@ solidifyChain(struct puzzle *puzzle)
puzzle->backptr->solnptr = puzzle;
puzzle = puzzle->backptr;
}
- sprintf(buf, "%d moves to complete!", i);
+ snprintf(buf, 256, "%d moves to complete!", i);
glutSetWindowTitle(buf);
}
@@ -763,7 +763,7 @@ solvePuzzle(void)
}
if (puzzles == NULL) {
freeSolutions();
- sprintf(buf, "I can't solve it! (%d positions examined)", i);
+ snprintf(buf, 256, "I can't solve it! (%d positions examined)", i);
glutSetWindowTitle(buf);
return 1;
}