mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-01 00:31:28 +00:00
strtok can return NULL
This commit is contained in:
parent
9e0c1b3f1f
commit
768ad80a97
1 changed files with 2 additions and 0 deletions
|
@ -320,6 +320,8 @@ HMS_fetch_servers (msg_server_t *list, int room_number)
|
|||
section_end = strstr(p, "\n\n");
|
||||
room = strtok(p, "\n");
|
||||
p = strtok(0, "");
|
||||
if (! p)
|
||||
break;
|
||||
for (; i < MAXSERVERLIST && ( end = strchr(p, '\n') ); ++i)
|
||||
{
|
||||
*end = '\0';
|
||||
|
|
Loading…
Reference in a new issue