chiark / gitweb /
udev-builtin-keyboard: Fix large scan codes on 32 bit architectures
[elogind.git] / src / udev / udev-builtin-keyboard.c
index ddd853594e96cd3792805fe7c35282143fb60e05..8f457ab4a297af1f7effb1b0b47e285830f47531 100644 (file)
@@ -88,7 +88,7 @@ static int builtin_keyboard(struct udev_device *dev, int argc, char *argv[], boo
                         continue;
 
                 /* KEYBOARD_KEY_<hex scan code>=<key identifier string> */
-                scancode = strtol(key + 13, &endptr, 16);
+                scancode = strtoul(key + 13, &endptr, 16);
                 if (endptr[0] != '\0') {
                         log_error("Error, unable to parse scan code from '%s'\n", key);
                         continue;