From 2ffd4e4f1af16b17a286ff354603a717f5d828a5 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:12:18 +0200 Subject: Replace all calls to sprintf() by calls to snprintf(). --- src/Fl_Screen_Driver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Fl_Screen_Driver.cxx') 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))); -- cgit v1.2.3