[BZ #2126]
[platform/upstream/glibc.git] / sysdeps / x86_64 / strtok.S
index de427dc..4037f0b 100644 (file)
@@ -1,6 +1,6 @@
 /* strtok (str, delim) -- Return next DELIM separated token from STR.
    For AMD x86-64.
-   Copyright (C) 1998,2000,2001,2002,2003,2005 Free Software Foundation, Inc.
+   Copyright (C) 1998,2000-2003,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Based on i686 version contributed by Ulrich Drepper
    <drepper@cygnus.com>, 1998.
@@ -205,6 +205,8 @@ L(epilogue):
 
 L(returnNULL):
        xorl %eax, %eax
+       /* Store the pointer to the next character.  */
+       movq %rdx, SAVE_PTR
        jmp L(epilogue)
 
 END (BP_SYM (FUNCTION))