Fix comparison that's always true
... because base_dir[0] and dest_dir[0] are *signed* chars.
This commit is contained in:
parent
719fed2b13
commit
5fcca347c6
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user