mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
fix a seg when the chat message doesn't have : in it
This commit is contained in:
parent
150128f158
commit
6beb96100a
1 changed files with 13 additions and 9 deletions
|
@ -454,11 +454,16 @@ Team_ParseChat (const char *string)
|
||||||
char *s;
|
char *s;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
s = strchr(string, ':') + 1;
|
if (!cl_freply->value)
|
||||||
|
return;
|
||||||
|
|
||||||
|
s = strchr(string, ':');
|
||||||
|
if (!(s = strchr(string, ':')))
|
||||||
|
return;
|
||||||
|
s++;
|
||||||
while (isspace(*s))
|
while (isspace(*s))
|
||||||
s++;
|
s++;
|
||||||
|
|
||||||
if (s && cl_freply->value) {
|
|
||||||
for (i = 0; f_replies[i].name; i++) {
|
for (i = 0; f_replies[i].name; i++) {
|
||||||
if (!strncmp(f_replies[i].name, s, strlen(f_replies[i].name)) && cl_freply->value) {
|
if (!strncmp(f_replies[i].name, s, strlen(f_replies[i].name)) && cl_freply->value) {
|
||||||
while (*s && !isspace(*s))
|
while (*s && !isspace(*s))
|
||||||
|
@ -467,7 +472,6 @@ Team_ParseChat (const char *string)
|
||||||
f_replies[i].lasttime = realtime;
|
f_replies[i].lasttime = realtime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue