diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index b201a27..1cdc033 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -2098,7 +2098,12 @@ int SV_CheckUserInfo(netadr_t *adr, char *userinfo, qboolean bIsReconnecting, in *pChar = ' '; } +#ifdef REHLDS_FIXES + Q_strcpy(name, newname); + Q_StripUnprintableAndSpace(name); +#else // REHLDS_FIXES TrimSpace(newname, name); +#endif // REHLDS_FIXES if (!Q_UnicodeValidate(name)) { @@ -4807,7 +4812,12 @@ void SV_ExtractFromUserinfo(client_t *cl) *p = ' '; } +#ifdef REHLDS_FIXES + Q_strcpy(newname, rawname); + Q_StripUnprintableAndSpace(newname); +#else // REHLDS_FIXES TrimSpace(rawname, newname); +#endif // REHLDS_FIXES if (!Q_UnicodeValidate(newname)) { diff --git a/rehlds/engine/unicode_strtools.cpp b/rehlds/engine/unicode_strtools.cpp index b2c7416..8d9932d 100644 --- a/rehlds/engine/unicode_strtools.cpp +++ b/rehlds/engine/unicode_strtools.cpp @@ -116,6 +116,11 @@ decodeFinishedMaybeCESU8: int __cdecl Q_IsUnprintableW(uchar16 c) { +#ifdef REHLDS_FIXES + if (!iswprint(c)) + return 1; +#endif // REHLDS_FIXES + switch (c) { case 0x202A: