From efd09f0a00e35f85b4065e30c210110fdfb0f225 Mon Sep 17 00:00:00 2001 From: Valeriu Ohan Date: Thu, 4 Jan 2018 13:00:02 +0000 Subject: [PATCH] Fixes the finished flag. --- kstring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kstring.c b/kstring.c index 253d281..3e0b642 100644 --- a/kstring.c +++ b/kstring.c @@ -38,7 +38,7 @@ char *kstrtok(const char *str, const char *sep, ks_tokaux_t *aux) { const char *p, *start; if (sep) { // set up the table - if (str == 0 && (aux->tab[0]&1)) return 0; // no need to set up if we have finished + if (str == 0 && aux->finished) return 0; // no need to set up if we have finished aux->finished = 0; if (sep[1]) { aux->sep = -1; -- 2.47.3