summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-03-21 17:05:32 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-03-21 17:05:32 +0100
commit34b89f84665641d03b7b82c0e9a9ce59698f4434 (patch)
tree66bc8e2b9f6a40a8f2be63c09106e3c2cc56a01b
parentfa84b58cd597a327e81244bcd517a029a7e63d04 (diff)
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. (?)
-rw-r--r--test/coordinates.cxx3
1 files changed, 2 insertions, 1 deletions
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 <FL/Fl.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Window.H>
+#include "../src/flstring.h" // fl_snprintf()
#include <stdio.h>
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;