mirror of
https://git.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
synced 2024-12-28 20:43: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 */
|
||||
char *token = s;
|
||||
s += strcspn(s, separators);
|
||||
*s++ = 0;
|
||||
if(*s) *s++ = 0;
|
||||
|
||||
return token;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue