diff --git a/src/base/system.cpp b/src/base/system.cpp index ac345d236..40f7b00a1 100644 --- a/src/base/system.cpp +++ b/src/base/system.cpp @@ -2834,8 +2834,7 @@ int str_comp_filenames(const char *a, const char *b) result = 0; do { - if(!result) - result = *a - *b; + result = *a - *b; ++a; ++b; } while(*a >= '0' && *a <= '9' && *b >= '0' && *b <= '9'); @@ -2844,7 +2843,7 @@ int str_comp_filenames(const char *a, const char *b) return 1; else if(*b >= '0' && *b <= '9') return -1; - else if(result) + else return result; }