From 5fcca347c65946a840a73b0202755830f97353b3 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 17 Mar 2025 20:28:47 +0100 Subject: Fix comparison that's always true ... because base_dir[0] and dest_dir[0] are *signed* chars. --- src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3