summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2020-06-28 07:32:56 +0200
committerFire-Head <Fire-Head@users.noreply.github.com>2020-06-28 07:32:56 +0200
commit1f1782c587600abef2bc3e77b4d126424dbd022d (patch)
tree90f1adcae3adbad776d429bf530b7ed0deef2c40 /src
parentfixes (diff)
downloadre3-1f1782c587600abef2bc3e77b4d126424dbd022d.tar
re3-1f1782c587600abef2bc3e77b4d126424dbd022d.tar.gz
re3-1f1782c587600abef2bc3e77b4d126424dbd022d.tar.bz2
re3-1f1782c587600abef2bc3e77b4d126424dbd022d.tar.lz
re3-1f1782c587600abef2bc3e77b4d126424dbd022d.tar.xz
re3-1f1782c587600abef2bc3e77b4d126424dbd022d.tar.zst
re3-1f1782c587600abef2bc3e77b4d126424dbd022d.zip
Diffstat (limited to '')
-rw-r--r--src/text/Text.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/text/Text.cpp b/src/text/Text.cpp
index 9d41d06e..926ccd1c 100644
--- a/src/text/Text.cpp
+++ b/src/text/Text.cpp
@@ -271,9 +271,9 @@ UnicodeToAscii(wchar *src)
{
static char aStr[256];
int len;
- for(len = 0; *src != '\0' && len < ARRAY_SIZE(aStr)-1; len++, src++)
+ for(len = 0; *src != '\0' && len < 256-1; len++, src++)
#ifdef MORE_LANGUAGES
- if(*src < 128 || ((CGame::russianGame || CGame::japaneseGame) && *src < ARRAY_SIZE(aStr)))
+ if(*src < 128 || ((CGame::russianGame || CGame::japaneseGame) && *src < 256))
#else
if(*src < 128)
#endif
@@ -289,8 +289,8 @@ UnicodeToAsciiForSaveLoad(wchar *src)
{
static char aStr[256];
int len;
- for(len = 0; *src != '\0' && len < ARRAY_SIZE(aStr)-1; len++, src++)
- if(*src < ARRAY_SIZE(aStr))
+ for(len = 0; *src != '\0' && len < 256-1; len++, src++)
+ if(*src < 256)
aStr[len] = *src;
else
aStr[len] = '#';
@@ -303,8 +303,8 @@ UnicodeToAsciiForMemoryCard(wchar *src)
{
static char aStr[256];
int len;
- for(len = 0; *src != '\0' && len < ARRAY_SIZE(aStr)-1; len++, src++)
- if(*src < ARRAY_SIZE(aStr))
+ for(len = 0; *src != '\0' && len < 256-1; len++, src++)
+ if(*src < 256)
aStr[len] = *src;
else
aStr[len] = '#';