diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2025-03-17 20:28:47 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2025-03-17 20:28:47 +0100 |
| commit | 5fcca347c65946a840a73b0202755830f97353b3 (patch) | |
| tree | 5be27605c9786f384b84b2de3475161119a3e333 /src/drivers/WinAPI | |
| parent | 719fed2b1342a46b3cc9887ff8c34703dcc83857 (diff) | |
Fix comparison that's always true
... because base_dir[0] and dest_dir[0] are *signed* chars.
Diffstat (limited to 'src/drivers/WinAPI')
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx index 242ba8ea0..72ed0680f 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx @@ -624,8 +624,8 @@ Fl_WinAPI_System_Driver::filename_relative(char *to, // O - Relative filename } // if there is a drive letter, make sure both paths use the same drive - if ( base_dir[0] < 128 && isalpha(base_dir[0]) && base_dir[1] == ':' - && dest_dir[0] < 128 && isalpha(dest_dir[0]) && dest_dir[1] == ':') { + if ( (unsigned)base_dir[0] < 128 && isalpha(base_dir[0]) && base_dir[1] == ':' + && (unsigned)dest_dir[0] < 128 && isalpha(dest_dir[0]) && dest_dir[1] == ':') { if (tolower(base_dir[0]) != tolower(dest_dir[0])) { strlcpy(to, dest_dir, tolen); return 0; |
