aboutsummaryrefslogtreecommitdiff
path: root/libX11/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-07-20 15:36:28 +0000
committermarha <marha@users.sourceforge.net>2010-07-20 15:36:28 +0000
commitcc8fdc643a25483734ae03cd5db72ae00ff561cd (patch)
tree618d8c34643146df47e908be359f8e5d04aadf07 /libX11/src
parenteee32e88a91aef246b8148f2efeb9c21f1316b2e (diff)
downloadvcxsrv-cc8fdc643a25483734ae03cd5db72ae00ff561cd.tar.gz
vcxsrv-cc8fdc643a25483734ae03cd5db72ae00ff561cd.tar.bz2
vcxsrv-cc8fdc643a25483734ae03cd5db72ae00ff561cd.zip
libX11 git update 20/7/2010
Diffstat (limited to 'libX11/src')
-rw-r--r--libX11/src/StrKeysym.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libX11/src/StrKeysym.c b/libX11/src/StrKeysym.c
index 8fb384505..6e9c427f8 100644
--- a/libX11/src/StrKeysym.c
+++ b/libX11/src/StrKeysym.c
@@ -27,6 +27,7 @@ in this Software without prior written authorization from The Open Group.
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include <limits.h>
#include "Xlibint.h"
#include <X11/Xresource.h>
#include <X11/keysymdef.h>
@@ -153,6 +154,15 @@ XStringToKeysym(_Xconst char *s)
return val | 0x01000000;
}
+ if (strlen(s) > 2 && s[0] == '0' && s[1] == 'x') {
+ char *tmp = NULL;
+ val = strtoul(s, &tmp, 16);
+ if (val == ULONG_MAX || (tmp && *tmp != '\0'))
+ return NoSymbol;
+ else
+ return val;
+ }
+
/* Stupid inconsistency between the headers and XKeysymDB: the former has
* no separating underscore, while some XF86* syms in the latter did.
* As a last ditch effort, try without. */