From 965bf6dbe41e550580852997a5dbd4b2c07a7ad4 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 17 Dec 2005 08:25:57 +0000 Subject: [PATCH] (xundump): Fix table row counting, broken by rev. 1.23. --- src/lib/common/xundump.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/common/xundump.c b/src/lib/common/xundump.c index dd8e0f4d..5a284707 100644 --- a/src/lib/common/xundump.c +++ b/src/lib/common/xundump.c @@ -516,7 +516,8 @@ xundump(FILE *fp, char *file, int expected_table) fixed_rows = has_const(ef_cadef(type)); need_sentinel = !fixed_rows; /* FIXME only approximation */ - for (row = 0; ; row++) { + row = 0; + for (;;) { lineno++; ch = skipfs(fp); if (ch == '/') @@ -536,6 +537,7 @@ xundump(FILE *fp, char *file, int expected_table) if (!fixed_rows) xuinitrow(type, row); res = xuloadrow(type, row, values); + row++; } freeflds(values); if (res < 0)