From 5b9d31a4b3fcd1163191218c720e98b5f5b8316a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 27 Apr 2011 07:15:00 +0200 Subject: [PATCH] Check record uid comes first in split config tables setnum() requires the record uid to come first, so we better ensure it does. --- src/lib/common/xundump.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/common/xundump.c b/src/lib/common/xundump.c index 9b17cab1c..fbf1b9c2e 100644 --- a/src/lib/common/xundump.c +++ b/src/lib/common/xundump.c @@ -408,6 +408,10 @@ chkflds(void) struct castr *ca = ef_cadef(cur_type); int i, len, cafldsmax, res = 0; + /* Record index must come first, to make cur_id work, see setnum() */ + if (ca[0].ca_table == cur_type && caflds[0] && fldca[0] != &ca[0]) + res = gripe("Header field %s must come first", ca[0].ca_name); + if (is_partial) { /* Need a join field, use 0-th selector */ if (!caflds[0]) -- 2.43.0