Commit 60590057 authored by rswindell's avatar rswindell
Browse files

strtok_r improvement: Initialize *last even when returning NULL

parent 4d9b39f6
......@@ -248,8 +248,10 @@ char* DLLCALL strtok_r(char *str, const char *delim, char **last)
while(*str && strchr(delim, *str))
++str;
if(!*str) /* no more tokens */
if(!*str) { /* no more tokens */
*last = str;
return NULL;
}
token = str;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment