summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Vojta <vojta@Math.Berkeley.EDU>2007-04-30 11:45:53 -0700
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-05-01 01:45:33 +0200
commit1af7e022be2bcbcf50d12c0c3847a853a911347c (patch)
tree601346fddaf868380742833287ffd4a13a6afcca /src
parentcc6bc3b848dfa312baf0cf4037b3e600d59a8f7e (diff)
Off-by-one (and comment) fix.
Just a quick patch:
Diffstat (limited to 'src')
-rw-r--r--src/acecad.c6
1 files changed, 3 insertions, 3 deletions
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)