forked from github/server
order atoi36 conditions by likeliness.
This commit is contained in:
parent
28293eb2df
commit
0137d70221
2 changed files with 6 additions and 6 deletions
|
@ -1026,7 +1026,7 @@ msgid "chaos_disease"
|
||||||
msgstr "\"$unit($unit) scheint von einer seltsamen Krankheit befallen.\""
|
msgstr "\"$unit($unit) scheint von einer seltsamen Krankheit befallen.\""
|
||||||
|
|
||||||
msgid "error1"
|
msgid "error1"
|
||||||
msgstr "\"$unit($unit) in $region($region): '$order($command)' - Auf dem Schiff befinden sich zuwenig erfahrene Seeleute.\""
|
msgstr "\"$unit($unit) in $region($region): '$order($command)' - Auf dem Schiff befinden sich zu wenige erfahrene Seeleute.\""
|
||||||
|
|
||||||
msgid "sp_icastle_effect"
|
msgid "sp_icastle_effect"
|
||||||
msgstr "\"Verwundert blicken die Bauern von $region($region) auf ein neues Gebäude.\""
|
msgstr "\"Verwundert blicken die Bauern von $region($region) auf ein neues Gebäude.\""
|
||||||
|
|
|
@ -37,12 +37,12 @@ int atoi36(const char *str)
|
||||||
++s;
|
++s;
|
||||||
}
|
}
|
||||||
while (isalnum(*(unsigned char *)s)) {
|
while (isalnum(*(unsigned char *)s)) {
|
||||||
if (isupper(*(unsigned char *)s))
|
if (islower(*s))
|
||||||
i = i * 36 + (*s) - 'A' + 10;
|
|
||||||
else if (islower(*s))
|
|
||||||
i = i * 36 + (*s) - 'a' + 10;
|
i = i * 36 + (*s) - 'a' + 10;
|
||||||
else if (isdigit(*s))
|
else if (isdigit(*s))
|
||||||
i = i * 36 + (*s) - '0';
|
i = i * 36 + (*s) - '0';
|
||||||
|
else if (isupper(*(unsigned char *)s))
|
||||||
|
i = i * 36 + (*s) - 'A' + 10;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
++s;
|
++s;
|
||||||
|
|
Loading…
Reference in a new issue