]> git.pond.sub.org Git - empserver/commitdiff
(xundump): Fix table row counting, broken by rev. 1.23.
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 17 Dec 2005 08:25:57 +0000 (08:25 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 17 Dec 2005 08:25:57 +0000 (08:25 +0000)
src/lib/common/xundump.c

index dd8e0f4d6d1d0e3626a22c77fc36bce014fc2a3d..5a2847070c1b22342d9ca5f4e95c4c413902aa60 100644 (file)
@@ -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)