diff options
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; } } |