DispatchUserMessage.cpp: fix chat censor crash

During "Sending client info ..." you might start receiving chat messages and LOCAL_E doesn't exist yet
Check if LOCAL_E is bad before trying to censor chat
This commit is contained in:
Unnamed 2019-02-17 18:32:15 +00:00
parent 21b593880c
commit ecff3ff17f

View File

@ -136,7 +136,7 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type, bf_read &
break;
case 4:
s = buf.GetNumBytesLeft();
if (s >= 256)
if (s >= 256 || CE_BAD(LOCAL_E))
break;
for (i = 0; i < s; i++)