LEDs: Fix string comparison bug
This resulted in duplicate sets of modifiers, since we were comparing pointer equality of two strings, rather than string equality. Oops. Signed-off-by: Daniel Stone <daniel@fooishbar.org>master
parent
504cc0b858
commit
b6c79ad0d8
|
@ -450,7 +450,9 @@ BindIndicators(struct xkb_desc * xkb, Bool force, LEDInfo *unbound,
|
|||
{
|
||||
for (i = 0; i < XkbNumIndicators; i++)
|
||||
{
|
||||
if (xkb->names->indicators[i] == XkbcAtomText(led->name))
|
||||
if (xkb->names->indicators[i] &&
|
||||
strcmp(xkb->names->indicators[i],
|
||||
XkbcAtomText(led->name)) == 0)
|
||||
{
|
||||
led->indicator = i + 1;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue