]> git.kaiwu.me - klib.git/commitdiff
Fixes the finished flag.
authorValeriu Ohan <vo2@sanger.ac.uk>
Thu, 4 Jan 2018 13:00:02 +0000 (13:00 +0000)
committerRob Davies <rmd+git@sanger.ac.uk>
Thu, 11 Jan 2018 14:30:02 +0000 (14:30 +0000)
kstring.c

index 253d2815396acb84cdc74b9dfb53c921067876a5..3e0b6423717a893befb21d87c8c951069dbd3405 100644 (file)
--- 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;