summaryrefslogtreecommitdiff
path: root/symbols.c
diff options
context:
space:
mode:
Diffstat (limited to 'symbols.c')
-rw-r--r--symbols.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/symbols.c b/symbols.c
index b5738c9..3fe0195 100644
--- a/symbols.c
+++ b/symbols.c
@@ -339,18 +339,19 @@ MergeKeyGroups(SymbolsInfo * info,
clobber = (from->defs.merge != MergeAugment);
report = (warningLevel > 9) ||
((into->defs.fileID == from->defs.fileID) && (warningLevel > 0));
- if (into->numLevels[group] >= from->numLevels[group])
- {
- resultSyms = into->syms[group];
- resultActs = into->acts[group];
- resultWidth = into->numLevels[group];
- }
- else
+ if ((from->numLevels[group] > into->numLevels[group])
+ || (clobber && (from->types[group] != None)))
{
resultSyms = from->syms[group];
resultActs = from->acts[group];
resultWidth = from->numLevels[group];
}
+ else
+ {
+ resultSyms = into->syms[group];
+ resultActs = into->acts[group];
+ resultWidth = into->numLevels[group];
+ }
if (resultSyms == NULL)
{
resultSyms = uTypedCalloc(resultWidth, KeySym);