From 34b89f84665641d03b7b82c0e9a9ce59698f4434 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 21 Mar 2022 17:05:32 +0100 Subject: MSVC: use fl_snprintf() rather than snprintf() Note that this fix includes "../src/flstring.h" which makes the source file no longer compileable without the full source code, e.g. by using "fltk-config --compile ...". This might be fixed later. (?) --- test/coordinates.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/coordinates.cxx b/test/coordinates.cxx index bb3651daf..f3f92c018 100644 --- a/test/coordinates.cxx +++ b/test/coordinates.cxx @@ -17,6 +17,7 @@ #include #include #include +#include "../src/flstring.h" // fl_snprintf() #include class Box : public Fl_Box { @@ -104,7 +105,7 @@ protected: result = 1; if (0 < Fl::event_x() && Fl::event_x() < w() && 0 < Fl::event_y() && Fl::event_y() < h()) { - snprintf(buffer, 128-1, fmt, Fl::event_x(), Fl::event_y()); + fl_snprintf(buffer, 128-1, fmt, Fl::event_x(), Fl::event_y()); message_box->copy_label(buffer); } else message_box->copy_label(""); break; -- cgit v1.2.3