aboutsummaryrefslogtreecommitdiff
path: root/termkey.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-06-16 17:07:47 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-06-16 17:07:47 +0100
commitb30f9461175f2f3eaa748a3a3ebe13d4aaba977e (patch)
treeafd5af3014768e5e6d8f1c8ac104d684cfc42ada /termkey.c
parent6e99f8ab857218d0fb42d93a3bcec17397476497 (diff)
downloadtermo-b30f9461175f2f3eaa748a3a3ebe13d4aaba977e.tar.gz
termo-b30f9461175f2f3eaa748a3a3ebe13d4aaba977e.tar.xz
termo-b30f9461175f2f3eaa748a3a3ebe13d4aaba977e.zip
Mouse position coordinates are unsigned
Diffstat (limited to 'termkey.c')
-rw-r--r--termkey.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/termkey.c b/termkey.c
index 4336996..60d76e8 100644
--- a/termkey.c
+++ b/termkey.c
@@ -743,10 +743,10 @@ TermKeyResult termkey_interpret_mouse(TermKey *tk, const TermKeyKey *key, TermKe
*button = 0;
if(col)
- *col = key->code.mouse[1];
+ *col = (unsigned char)key->code.mouse[1];
if(line)
- *line = key->code.mouse[2];
+ *line = (unsigned char)key->code.mouse[2];
if(!event)
return TERMKEY_RES_KEY;
@@ -1070,7 +1070,7 @@ size_t termkey_strfkey(TermKey *tk, char *buffer, size_t len, TermKeyKey *key, T
if(l <= 0) return pos;
pos += l;
- l = snprintf(buffer + pos, len - pos, " @ (%d,%d)", col, line);
+ l = snprintf(buffer + pos, len - pos, " @ (%u,%u)", col, line);
}
}
break;