summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2025-03-17 20:28:47 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2025-03-17 20:28:47 +0100
commit5fcca347c65946a840a73b0202755830f97353b3 (patch)
tree5be27605c9786f384b84b2de3475161119a3e333 /src/drivers
parent719fed2b1342a46b3cc9887ff8c34703dcc83857 (diff)
Fix comparison that's always true
... because base_dir[0] and dest_dir[0] are *signed* chars.
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx4
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;