Respect explicit minimum/maximum keycodes 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>
diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c
index 40fe60a..e8d3d35 100644
--- a/src/xkbcomp/keycodes.c
+++ b/src/xkbcomp/keycodes.c
@@ -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;
}