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-Url: https://pd.if.org/git/?p=pdclib.old;a=commitdiff_plain;h=23427de1907e39aac961f4dfd90dfba0066aae95 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