Respect explicit minimum/maximum keycodes
authorDaniel Stone <daniel@fooishbar.org>
Thu, 16 Feb 2012 11:18:49 +0000 (11:18 +0000)
committerDaniel Stone <daniel@fooishbar.org>
Thu, 16 Feb 2012 11:18:49 +0000 (11:18 +0000)
Make sure we carry over an explicit minimum/maximum keycode setting,
rather than just using the computed minimum/maximum; this got broken
while changing the keycode range to be unsigned.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reported-by: Pekka Paalanen <ppaalanen@gmail.com>
src/xkbcomp/keycodes.c

index 40fe60a..e8d3d35 100644 (file)
@@ -531,13 +531,13 @@ MergeIncludedKeycodes(KeyNamesInfo * into, KeyNamesInfo * from,
         into->errorCount++;
     if (from->explicitMin != 0)
     {
-        if ((into->explicitMin < 0)
+        if ((into->explicitMin == 0)
             || (into->explicitMin > from->explicitMin))
             into->explicitMin = from->explicitMin;
     }
     if (from->explicitMax > 0)
     {
-        if ((into->explicitMax < 0)
+        if ((into->explicitMax == 0)
             || (into->explicitMax < from->explicitMax))
             into->explicitMax = from->explicitMax;
     }