Fixed undefined behaviour with isdigit calls

Reverted static links
This commit is contained in:
Artem Golubikhin 2017-01-29 22:55:19 +00:00
parent 3dee14fff6
commit b1d857cc99
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/opt/intel/bin/icpc \
-O3 -m32 -shared \
-fno-builtin -fno-rtti -Qoption,cpp,--treat_func_as_string_literal_cpp -no-intel-extensions -fno-stack-protector -std=c++14 \
-ipo -s -static-libgcc -static-intel -static-libstdc++ -static-libc \
-ipo -s -static-libgcc -static-intel \
-msse2 -fp-model strict -fomit-frame-pointer -g0 \
-fvisibility=hidden \
-Ihlsdk/common -Ihlsdk/dlls -Ihlsdk/engine -Ihlsdk/pm_shared -Imetamod \

View File

@ -579,7 +579,7 @@ void OnClientUserInfoChanged_PreHook(edict_t *pPlayerEntity, char *infoBuffer) {
if ((utf16NewName[i] == '#' && g_pcvarNameReplaceNumberSign->value) ||
(utf16NewName[i] == '%' && g_pcvarNameReplacePercentSign->value) ||
(utf16NewName[i] == '&' && g_pcvarNameReplaceAmpersand->value) ||
(n && g_pcvarNameReplacePlusSign->value && utf16CorrectedName[n-1] == '+' && (isdigit(utf16NewName[i]) || isalpha(utf16NewName[i]))))
(n && g_pcvarNameReplacePlusSign->value && utf16CorrectedName[n-1] == '+' && utf16NewName[i] <= 127 && (isdigit(utf16NewName[i]) || isalpha(utf16NewName[i]))))
{
utf16CorrectedName[n++] = 0xFF00 + utf16NewName[i] - 0x20;
} else {