diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2022-09-29 09:56:15 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2022-09-29 10:01:27 +0200 |
commit | 42d05c8a3f59f99daccaf65a117d183828446d71 (patch) | |
tree | aff35e0dc058164cb29810a2fc44366ef8d9d758 /mendeleev.c | |
parent | dbf2f4d6d117d8ef951224f07ccf62bb89d6ec6b (diff) | |
download | mendeleev-42d05c8a3f59f99daccaf65a117d183828446d71.tar.gz |
Test the longest tail
Diffstat (limited to 'mendeleev.c')
-rw-r--r-- | mendeleev.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mendeleev.c b/mendeleev.c index 44e2cb4..81127dd 100644 --- a/mendeleev.c +++ b/mendeleev.c @@ -150,18 +150,13 @@ explode (const char *word) if (!formula) return NULL; - while (*word) + while (*formula->tail) { - word = NULL; formula_t *f = formula; while (f) { if (*f->tail) - { - advance (f); - if (!word) - word = f->tail; - } + advance (f); f = f->next; } } |