From: solar Date: Fri, 14 May 2010 04:12:04 +0000 (+0000) Subject: Bug #36 (strtok does not return last token if string does not end with delimiter... X-Git-Tag: v0.5~95 X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=de813f064004aa2d9c13256af1b075e3b8942b02 Bug #36 (strtok does not return last token if string does not end with delimiter) fixed. --- 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