projects
/
platform
/
upstream
/
libxkbcommon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
504cc0b
)
LEDs: Fix string comparison bug
author
Daniel Stone
<daniel@fooishbar.org>
Thu, 22 Mar 2012 14:32:23 +0000
(14:32 +0000)
committer
Daniel Stone
<daniel@fooishbar.org>
Thu, 22 Mar 2012 14:32:23 +0000
(14:32 +0000)
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>
src/xkbcomp/indicators.c
patch
|
blob
|
history
diff --git
a/src/xkbcomp/indicators.c
b/src/xkbcomp/indicators.c
index
d1ecc75
..
55328c2
100644
(file)
--- a/
src/xkbcomp/indicators.c
+++ b/
src/xkbcomp/indicators.c
@@
-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;