mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 16:51:18 +00:00
[CDMAKE][CTR] Fix strtok_s for empty strings. Part of Wine commit 4fa616c by Bernhard Übelacker.
svn path=/trunk/; revision=72406
This commit is contained in:
parent
f6aaf58005
commit
761db77da5
2 changed files with 6 additions and 0 deletions
|
@ -18,7 +18,10 @@ char * CDECL strtok_s(char *str, const char *delim, char **ctx)
|
|||
while(*str && strchr(delim, *str))
|
||||
str++;
|
||||
if(!*str)
|
||||
{
|
||||
*ctx = str;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
*ctx = str+1;
|
||||
while(**ctx && !strchr(delim, **ctx))
|
||||
|
|
|
@ -1930,7 +1930,10 @@ char* strtok_s(char *str, const char *delim, char **ctx)
|
|||
while (*str && strchr(delim, *str))
|
||||
str++;
|
||||
if (!*str)
|
||||
{
|
||||
*ctx = str;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
*ctx = str + 1;
|
||||
while (**ctx && !strchr(delim, **ctx))
|
||||
|
|
Loading…
Reference in a new issue