diff --git a/src/acecad.c b/src/acecad.c index 1c0b4f7..c146105 100644 --- a/src/acecad.c +++ b/src/acecad.c @@ -185,7 +185,7 @@ IsUSBLine(int fd) } } -/* Heavily inspired by synpatics/eventcomm.c */ +/* Heavily inspired by synaptics/eventcomm.c */ #define DEV_INPUT_EVENT "/dev/input/event" #define EV_DEV_NAME_MAXLEN 64 @@ -196,8 +196,8 @@ static Bool fd_query_acecad(int fd, char *ace_name) { char name[256] = "Unknown"; int cmp_at = strlen(ace_name); - if (cmp_at > 256) - cmp_at = 256; + if (cmp_at > 255) + cmp_at = 255; ioctl(fd, EVIOCGNAME(sizeof(name)), name); name[cmp_at] = '\0'; if (xf86NameCmp(name, ace_name) == 0)