From de813f064004aa2d9c13256af1b075e3b8942b02 Mon Sep 17 00:00:00 2001 From: solar Date: Fri, 14 May 2010 04:12:04 +0000 Subject: [PATCH] Bug #36 (strtok does not return last token if string does not end with delimiter) fixed. --- functions/string/strtok.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/string/strtok.c b/functions/string/strtok.c index 691c640..b922085 100644 --- a/functions/string/strtok.c +++ b/functions/string/strtok.c @@ -68,7 +68,8 @@ char * strtok( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 ) } /* parsed to end of string */ - return ( tmp = NULL ); + tmp = NULL; + return s1; } #endif -- 2.40.0