summaryrefslogtreecommitdiff
path: root/test/pack.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'test/pack.cxx')
-rw-r--r--test/pack.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/pack.cxx b/test/pack.cxx
index 64398ddab..62ff92323 100644
--- a/test/pack.cxx
+++ b/test/pack.cxx
@@ -104,7 +104,7 @@ int main(int argc, char **argv) {
int xx = 35;
for (int i = 0; i < nbuttons; i++) {
char ltxt[8];
- sprintf(ltxt, "b%d", i + 1);
+ snprintf(ltxt, 8, "b%d", i + 1);
Fl_Button *b = new Fl_Button(xx, xx, 25, 25);
b->copy_label(ltxt);
xx += 10;