From 27d22aeed6e03fdb211bdec1da99d6d7ea7f3974 Mon Sep 17 00:00:00 2001 From: MatthiasM <–github@matthiasm.com> Date: Fri, 3 Jan 2020 18:13:14 +0100 Subject: Fixed previous commit for MSWindows. --- src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx index f28802ba0..b18b9c98e 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx @@ -891,7 +891,7 @@ char *Fl_WinAPI_System_Driver::preference_rootnode(Fl_Preferences *prefs, Fl_Pre if ( (application==0L) || (application[0]==0) ) application = "unknown"; - snprintf(filename + strlen(filename), sizeof(filename) - strlen(filename), + snprintf(filename + strlen(filename), FL_PATH_MAX - strlen(filename), "/%s/%s.prefs", vendor, application); for (char *s = filename; *s; s++) if (*s == '\\') *s = '/'; return filename; -- cgit v1.2.3