diff --git a/src/worksheet.c b/src/worksheet.c index 6f63a68e..a106c5d9 100644 --- a/src/worksheet.c +++ b/src/worksheet.c @@ -1717,9 +1717,11 @@ _expand_table_formula(const char *formula) ptr = formula; - while (*ptr++) { + while (*ptr) { if (*ptr == '@') ref_count++; + + ptr++; } if (ref_count == 0) {