Fix use of variable out-of-scope (PR #242)

This commit is contained in:
fire-eggs 2021-06-23 11:46:38 -04:00 committed by Albrecht Schlosser
parent 75211977b2
commit 55eee459d4

View File

@ -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));