about summary refs log tree commit diff
path: root/sysdeps/generic/strsep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/strsep.c')
-rw-r--r--sysdeps/generic/strsep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/generic/strsep.c b/sysdeps/generic/strsep.c
index 1c20eb0959..7ca44f3c3a 100644
--- a/sysdeps/generic/strsep.c
+++ b/sysdeps/generic/strsep.c
@@ -18,6 +18,7 @@
 
 #include <string.h>
 
+#undef __strsep
 #undef strsep
 
 char *
@@ -43,7 +44,7 @@ __strsep (char **stringp, const char *delim)
 	  if (*begin == ch)
 	    end = begin;
 	  else
-	    end = strchr (begin, delim[0]);
+	    end = strchr (begin + 1, ch);
 	}
     }
   else