Always have at least one level in types
authorDaniel Stone <daniel@fooishbar.org>
Wed, 8 Aug 2012 11:55:04 +0000 (13:55 +0200)
committerDaniel Stone <daniel@fooishbar.org>
Wed, 8 Aug 2012 14:23:30 +0000 (16:23 +0200)
The ONE_LEVEL definition from xkeyboard-config doesn't specify any
actual levels, but there's an implicit (anything unmatched) -> Level1
rule.  Given this, each type actually has at least one level, whether or
not it specifies anything.

Fixes stringcomp.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
src/xkbcomp/keytypes.c

index 878f10e..ab454af 100644 (file)
@@ -828,7 +828,7 @@ HandleKeyTypeDef(KeyTypesInfo *info, KeyTypeDef *def, enum merge_mode merge)
         .merge = (def->merge == MERGE_DEFAULT ? merge : def->merge),
         .name = def->name,
         .mask = 0, .vmask = 0,
-        .num_levels = 0,
+        .num_levels = 1,
         .entries = darray_new(),
         .level_names = darray_new(),
     };