strtok can return NULL
This commit is contained in:
1 parent
9d42a5ad5e
commit
56fac10b14
1 file changed
+2
@@ -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';
|
||||
|
||||
Reference in new issue
Block a user