symbols: fix bug in symbol merging
authorRan Benita <ran234@gmail.com>
Wed, 11 Jul 2012 18:37:59 +0000 (21:37 +0300)
committerDaniel Stone <daniel@fooishbar.org>
Thu, 12 Jul 2012 08:42:12 +0000 (09:42 +0100)
commite4d4de8c9e76bd7fa593d3dc9ba385d9da8b8d84
treea8a9dd01c0d6f9fde0ab01ed57c2650c271e5f06
parent09d1445b4ad0ca5e13d13c2262c5bf1d583b16fe
symbols: fix bug in symbol merging

When we merge two KeyInfo's (belonging to the same keycode), we may take
a shortcut from copying if we see that the merged keys will be exactly
like those in one of the two KeyInfo's. In the case where we take the
symbols from the KeyInfo we are *not* merging into, we need to copy
the three arrays:
    syms[group], symsMapNumEntries[group], symsMapIndex[group]
The code currently only copies the first one, so if there's a merge
conflict some levels may seem to disappear (i.e. have a NoSymbol
keysym).

This fixes the failing test added in c8d6bba.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/xkbcomp/symbols.c