Cross-platform fix and a little style change

This commit is contained in:
erorcun 2020-10-21 03:55:35 +03:00
parent 0750f04019
commit 0265804003
2 changed files with 31 additions and 29 deletions

View file

@ -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++;