diff options
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r-- | core/ustring.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 7a5129962b..6a93d7789e 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -489,6 +489,18 @@ signed char String::naturalnocasecmp_to(const String &p_str) const { const CharType *that_str = p_str.c_str(); if (this_str && that_str) { + + while (*this_str == '.' || *that_str == '.') { + if (*this_str++ != '.') + return 1; + if (*that_str++ != '.') + return -1; + if (!*that_str) + return 1; + if (!*this_str) + return -1; + } + while (*this_str) { if (!*that_str) |