fix a seg when the chat message doesn't have : in it

This commit is contained in:
Bill Currie 2001-11-12 03:32:04 +00:00
parent 150128f158
commit 6beb96100a

View file

@ -454,11 +454,16 @@ Team_ParseChat (const char *string)
char *s;
int i;
s = strchr(string, ':') + 1;
if (!cl_freply->value)
return;
s = strchr(string, ':');
if (!(s = strchr(string, ':')))
return;
s++;
while (isspace(*s))
s++;
if (s && cl_freply->value) {
for (i = 0; f_replies[i].name; i++) {
if (!strncmp(f_replies[i].name, s, strlen(f_replies[i].name)) && cl_freply->value) {
while (*s && !isspace(*s))
@ -467,7 +472,6 @@ Team_ParseChat (const char *string)
f_replies[i].lasttime = realtime;
}
}
}
}
void