summaryrefslogtreecommitdiffstats
path: root/src/text/Messages.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-10-21 02:55:35 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2020-10-21 02:55:35 +0200
commit02658040031f93f91ef50c947443b5efdd938c12 (patch)
treef97953c5b0f6c090ad0d094c0b0676d36ec8a0ed /src/text/Messages.cpp
parentMessages, fix Font (diff)
downloadre3-02658040031f93f91ef50c947443b5efdd938c12.tar
re3-02658040031f93f91ef50c947443b5efdd938c12.tar.gz
re3-02658040031f93f91ef50c947443b5efdd938c12.tar.bz2
re3-02658040031f93f91ef50c947443b5efdd938c12.tar.lz
re3-02658040031f93f91ef50c947443b5efdd938c12.tar.xz
re3-02658040031f93f91ef50c947443b5efdd938c12.tar.zst
re3-02658040031f93f91ef50c947443b5efdd938c12.zip
Diffstat (limited to 'src/text/Messages.cpp')
-rw-r--r--src/text/Messages.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/text/Messages.cpp b/src/text/Messages.cpp
index 70225860..257a47ce 100644
--- a/src/text/Messages.cpp
+++ b/src/text/Messages.cpp
@@ -71,10 +71,7 @@ CMessages::WideStringCompare(wchar *str1, wchar *str2, uint16 size)
if (len1 != len2 && (len1 < size || len2 < size))
return false;
- for (int32 i = 0; i < size; i++) {
- if (FixupChar(str1[i]) == '\0' || i > size)
- break;
-
+ for (int32 i = 0; FixupChar(str1[i]) != '\0' && i < size; i++) {
if (FixupChar(str1[i]) != FixupChar(str2[i]))
return false;
}
@@ -393,7 +390,7 @@ CMessages::InsertNumberInString(wchar *str, int32 n1, int32 n2, int32 n3, int32
if (str[c] == '~' && str[c + 1] == '1' && str[c + 2] == '~') {
#endif
c += 3;
- for (int j=0; j<outLen; j++)
+ for (int j = 0; j < outLen; j++)
*(outstr++) = wNumStr[j++];
i++;