mirror of
https://git.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
synced 2024-12-29 13:03:38 +01:00
string: fix strtok detecting NUL only after separators
This commit is contained in:
parent
ea35c18c41
commit
a0ceeefaf4
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ char *strtok(char * restrict new_s, char const * restrict separators)
|
||||||
/* Skip non-delimiters */
|
/* Skip non-delimiters */
|
||||||
char *token = s;
|
char *token = s;
|
||||||
s += strcspn(s, separators);
|
s += strcspn(s, separators);
|
||||||
*s++ = 0;
|
if(*s) *s++ = 0;
|
||||||
|
|
||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue