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 /src/Fl_Screen_Driver.cxx | |
| parent | 53d9614adbb728fc4db983c9bb817c6eea870994 (diff) | |
Replace all calls to sprintf() by calls to snprintf().
Diffstat (limited to 'src/Fl_Screen_Driver.cxx')
| -rw-r--r-- | src/Fl_Screen_Driver.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx index 3f0d1b4f8..e0aa8a09f 100644 --- a/src/Fl_Screen_Driver.cxx +++ b/src/Fl_Screen_Driver.cxx @@ -379,7 +379,7 @@ void Fl_Screen_Driver::transient_scale_display(float f, int nscreen) Fl_Window *win = new Fl_Window((X + W/2) -w/2, (Y + H/2) -w/4, w, w/2, 0); b = new Fl_Box(FL_FLAT_BOX, 0, 0, w, w/2, NULL); char str[10]; - sprintf(str, "%d %%", int(f * 100 + 0.5)); + snprintf(str, 10, "%d %%", int(f * 100 + 0.5)); b->copy_label(str); b->labelfont(FL_TIMES_BOLD); b->labelsize(Fl_Fontsize(30 * s / d->scale(nscreen))); |
