From 55eee459d4a85edb6cda94e033c9b915bbfcfdbd Mon Sep 17 00:00:00 2001 From: fire-eggs Date: Wed, 23 Jun 2021 11:46:38 -0400 Subject: Fix use of variable out-of-scope (PR #242) --- src/Fl_File_Chooser2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Fl_File_Chooser2.cxx') diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index 6350f1db7..736a2f95c 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -1491,9 +1491,9 @@ Fl_File_Chooser::value(const char *filename) return; } + char fixpath[FL_PATH_MAX]; // Path with slashes converted if (Fl::system_driver()->backslash_as_slash()) { // See if the filename contains backslashes... - char fixpath[FL_PATH_MAX]; // Path with slashes converted if (strchr(filename, '\\')) { // Convert backslashes to slashes... strlcpy(fixpath, filename, sizeof(fixpath)); -- cgit v1.2.3