diff options
Diffstat (limited to 'libgfortran/runtime/string.c')
-rw-r--r-- | libgfortran/runtime/string.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libgfortran/runtime/string.c b/libgfortran/runtime/string.c index 5a81bd6..a102c3b 100644 --- a/libgfortran/runtime/string.c +++ b/libgfortran/runtime/string.c @@ -36,7 +36,10 @@ compare0 (const char *s1, gfc_charlen_type s1_len, const char *s2) /* Strip trailing blanks from the Fortran string. */ len = fstrlen (s1, s1_len); - if (len != strlen(s2)) return 0; /* don't match */ + + if ((size_t) len != strlen(s2)) + return 0; /* don't match */ + return strncasecmp (s1, s2, len) == 0; } |