From bcbac585ab7f87f3415b8d7f4e54e62de6cc8b5f 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. git-svn-id: https://srv7.svn-repos.de/dev34/pdclib/trunk@406 546481bc-9713-0410-bf18-d3337bbf4a3e --- 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.30.2