summary refs log tree commit diff
path: root/sysdeps/generic/strtok.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/strtok.c')
-rw-r--r--sysdeps/generic/strtok.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/generic/strtok.c b/sysdeps/generic/strtok.c
index cb30619a43..4f89efa6f0 100644
--- a/sysdeps/generic/strtok.c
+++ b/sysdeps/generic/strtok.c
@@ -53,7 +53,7 @@ strtok (s, delim)
   s = strpbrk (token, delim);
   if (s == NULL)
     /* This token finishes the string.  */
-    olds = NULL;
+    olds = strchr (token, '\0');
   else
     {
       /* Terminate the token and make OLDS point past it.  */