(xundump): Fix table row counting, broken by rev. 1.23.

This commit is contained in:
Markus Armbruster 2005-12-17 08:25:57 +00:00
parent fdea1beb34
commit 965bf6dbe4

View file

@ -516,7 +516,8 @@ xundump(FILE *fp, char *file, int expected_table)
fixed_rows = has_const(ef_cadef(type)); fixed_rows = has_const(ef_cadef(type));
need_sentinel = !fixed_rows; /* FIXME only approximation */ need_sentinel = !fixed_rows; /* FIXME only approximation */
for (row = 0; ; row++) { row = 0;
for (;;) {
lineno++; lineno++;
ch = skipfs(fp); ch = skipfs(fp);
if (ch == '/') if (ch == '/')
@ -536,6 +537,7 @@ xundump(FILE *fp, char *file, int expected_table)
if (!fixed_rows) if (!fixed_rows)
xuinitrow(type, row); xuinitrow(type, row);
res = xuloadrow(type, row, values); res = xuloadrow(type, row, values);
row++;
} }
freeflds(values); freeflds(values);
if (res < 0) if (res < 0)