summaryrefslogtreecommitdiff
path: root/test/table.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/table.cxx
parent53d9614adbb728fc4db983c9bb817c6eea870994 (diff)
Replace all calls to sprintf() by calls to snprintf().
Diffstat (limited to 'test/table.cxx')
-rw-r--r--test/table.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/table.cxx b/test/table.cxx
index 1a540ea4f..dbca2e89f 100644
--- a/test/table.cxx
+++ b/test/table.cxx
@@ -54,7 +54,7 @@ void DemoTable::draw_cell(TableContext context,
int R, int C, int X, int Y, int W, int H)
{
static char s[40];
- sprintf(s, "%d/%d", R, C); // text for each cell
+ snprintf(s, 40, "%d/%d", R, C); // text for each cell
switch ( context )
{
@@ -271,7 +271,7 @@ void setcellbgcolor_cb(Fl_Widget *w, void *data)
char *itoa(int val)
{
static char s[80];
- sprintf(s, "%d", val);
+ snprintf(s, 80, "%d", val);
return(s);
}