diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-09-26 16:12:18 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-09-26 16:12:18 +0200 |
| commit | 2ffd4e4f1af16b17a286ff354603a717f5d828a5 (patch) | |
| tree | 99e2d4a7e2fde8e3abb027eb687901440750ee00 /test/tree.fl | |
| parent | 53d9614adbb728fc4db983c9bb817c6eea870994 (diff) | |
Replace all calls to sprintf() by calls to snprintf().
Diffstat (limited to 'test/tree.fl')
| -rw-r--r-- | test/tree.fl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/tree.fl b/test/tree.fl index d44d4c08b..ea068a5c8 100644 --- a/test/tree.fl +++ b/test/tree.fl @@ -270,7 +270,7 @@ tree->add("Long Line/Longer Line/The quick brown fox jumped over the lazy dog. - // Add 500 items in numerical order for ( int t=0; t<500; t++ ) { static char s[80]; - sprintf(s, "500 Items/item %04d", t+1); + snprintf(s, 80, "500 Items/item %04d", t+1); tree->add(s); } tree->close("500 Items"); // close the 500 items by default @@ -986,7 +986,7 @@ while (item) { if ( parent == 0 ) parent = tree->root(); char s[80]; for ( int i=0; i<20000; i++ ) { - sprintf(s, "Item \#%d", item_id+i); + snprintf(s, 80, "Item \#%d", item_id+i); tree->add(parent, s); } item_id += 20000; |
