summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 4e733c2..1f815e9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -171,8 +171,13 @@ strtok_ws (char *s)
char *nonws;
static char *last = NULL;
- if (s)
+ if (s == NULL)
last = s;
+ else if (last == NULL)
+ {
+ PRINT_ERROR (("strtok_ws() called but not initalized, this is a *BUG*\n"));
+ abort();
+ }
/* skip to first non-whitespace char. */
while (*last && isspace (*last)) last++;