From 1999031e0438e50a8037d2e3022a55c4db94637a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 Feb 2001 15:39:07 +0000 Subject: Update. 2001-02-21 Ulrich Drepper * sysdeps/i386/i686/strtok.S: Continue to return NULL after the first time this happened. 2001-02-21 Andreas Jaeger * string/tst-strtok.c: New testcase, reported by Andrew Church . --- sysdeps/i386/i686/strtok.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sysdeps') diff --git a/sysdeps/i386/i686/strtok.S b/sysdeps/i386/i686/strtok.S index a982a4aa49..e21b5f65e6 100644 --- a/sysdeps/i386/i686/strtok.S +++ b/sysdeps/i386/i686/strtok.S @@ -1,6 +1,6 @@ /* strtok (str, delim) -- Return next DELIM separated token from STR. For Intel 80686. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -123,6 +123,8 @@ ENTRY (BP_SYM (FUNCTION)) the last run. */ cmpl $0, %edx cmove %eax, %edx + testl %edx, %edx + jz L(returnNULL) #if __BOUNDED_POINTERS__ # ifdef USE_AS_STRTOK_R movl SAVE(%esp), %ecx /* borrow %ecx for a moment */ -- cgit v1.2.3