Make xundump oops on virtual selectors

Commit da8a1dae (v4.3.12) introduced virtual selectors, but neglected
to update xundump.  Xundump can't work for them, because they don't
provide a setter method.

This didn't actually break anything, because all virtual selectors
have flag NSC_EXTRA set, or are in table EF_VERSION, which xundump
refuses to touch.

Make deffld() oops on virtual selector, just to be safe.
This commit is contained in:
Markus Armbruster 2008-05-12 11:26:41 +02:00
parent 3b4de2feb1
commit a38625d9a4
2 changed files with 5 additions and 2 deletions

View file

@ -47,6 +47,7 @@
* - Check each partial table supplies the same rows
* - Check EFF_CFG tables are dense
* - Symbolic array indexes
* - Option to treat missing and unknown fields as warning, not error
* TODO, but hardly worth the effort:
* - Permit reordering of array elements
*/
@ -352,7 +353,7 @@ deffld(int fldno, char *name, int idx)
if (res < 0)
return gripe("Header %s of field %d is %s", name, fldno + 1,
res == M_NOTUNIQUE ? "ambiguous" : "unknown");
if (ca[res].ca_flags == NSC_EXTRA)
if (ca[res].ca_flags == NSC_EXTRA || CANT_HAPPEN(ca[res].ca_get))
return gripe("Extraneous header %s in field %d", name, fldno + 1);
if (ca[res].ca_type != NSC_STRINGY && ca[res].ca_len != 0) {
if (idx < 0)