[CDMAKE][CTR] Fix strtok_s for empty strings. Part of Wine commit 4fa616c by Bernhard...
[reactos.git] / reactos / sdk / tools / cdmake / cdmake.c
index 5f1db6e..d02ccc6 100644 (file)
@@ -1930,7 +1930,10 @@ char* strtok_s(char *str, const char *delim, char **ctx)
     while (*str && strchr(delim, *str))
         str++;
     if (!*str)
+    {
+        *ctx = str;
         return NULL;
+    }
 
     *ctx = str + 1;
     while (**ctx && !strchr(delim, **ctx))