summaryrefslogtreecommitdiff
path: root/src/Fl_File_Chooser2.cxx
diff options
context:
space:
mode:
authorfire-eggs <kbroutley@gmail.com>2021-06-23 11:46:38 -0400
committerAlbrecht Schlosser <albrechts.fltk@online.de>2021-06-27 14:34:17 +0200
commit55eee459d4a85edb6cda94e033c9b915bbfcfdbd (patch)
treecb8b7369c24e49cf0f6f1e3e1cd107b9d82b0d79 /src/Fl_File_Chooser2.cxx
parent75211977b2e6b227db9d498d8e7e9203e3dbed6e (diff)
Fix use of variable out-of-scope (PR #242)
Diffstat (limited to 'src/Fl_File_Chooser2.cxx')
-rw-r--r--src/Fl_File_Chooser2.cxx2
1 files changed, 1 insertions, 1 deletions
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));