summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/compat.c b/compat.c
index 759535a..2b00142 100644
--- a/compat.c
+++ b/compat.c
@@ -50,6 +50,7 @@ typedef struct _GroupCompatInfo
{
unsigned char fileID;
unsigned char merge;
+ Bool defined;
unsigned char real_mods;
unsigned short vmods;
} GroupCompatInfo;
@@ -280,8 +281,8 @@ AddGroupCompat(CompatInfo * info, unsigned group, GroupCompatInfo * newGC)
ACTION1("Using %s definition\n",
(merge == MergeAugment ? "old" : "new"));
}
- if (merge != MergeAugment)
- *gc = *newGC;
+ if(newGC->defined && (merge != MergeAugment || !gc->defined))
+ *gc = *newGC;
return True;
}
@@ -715,6 +716,7 @@ HandleGroupCompatDef(GroupCompatDef * def,
}
tmp.real_mods = val.uval & 0xff;
tmp.vmods = (val.uval >> 8) & 0xffff;
+ tmp.defined = True;
return AddGroupCompat(info, def->group - 1, &tmp);
}