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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/generic/strsep.c b/sysdeps/generic/strsep.c
index 7ca44f3c3a..004d8d8ac2 100644
--- a/sysdeps/generic/strsep.c
+++ b/sysdeps/generic/strsep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 93, 96, 97, 98, 99 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -43,6 +43,8 @@ __strsep (char **stringp, const char *delim)
 	{
 	  if (*begin == ch)
 	    end = begin;
+	  else if (*begin == '\0')
+	    end = NULL;
 	  else
 	    end = strchr (begin + 1, ch);
 	}