aboutsummaryrefslogtreecommitdiff
path: root/mendeleev.c
diff options
context:
space:
mode:
Diffstat (limited to 'mendeleev.c')
-rw-r--r--mendeleev.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mendeleev.c b/mendeleev.c
index f6db8ea..e48b129 100644
--- a/mendeleev.c
+++ b/mendeleev.c
@@ -150,10 +150,9 @@ explode (const char *word)
if (!formula)
return NULL;
- while (*formula->tail)
- for (formula_t * f = formula; f; f = f->next)
- if (*f->tail)
- advance (f);
+ for (formula_t * f = formula; f; f = f->next)
+ while (*f->tail)
+ advance (f);
return formula;
}