diff options
Diffstat (limited to 'sysdeps/generic/strtok_r.c')
-rw-r--r-- | sysdeps/generic/strtok_r.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/generic/strtok_r.c b/sysdeps/generic/strtok_r.c index 488d3ea..870fb27 100644 --- a/sysdeps/generic/strtok_r.c +++ b/sysdeps/generic/strtok_r.c @@ -54,7 +54,7 @@ strtok_r (s, delim, save_ptr) s = strpbrk (token, delim); if (s == NULL) /* This token finishes the string. */ - *save_ptr = NULL; + *save_ptr = strchr (token, '\0'); else { /* Terminate the token and make *SAVE_PTR point past it. */ |