gpm/gpm-ps2_read.patch
2010-09-09 12:55:44 +00:00

14 lines
664 B
Diff

Index: src/daemon/getmousedata.c
===================================================================
--- src/daemon/getmousedata.c.orig 2009-02-09 10:58:53.000000000 +0100
+++ src/daemon/getmousedata.c 2010-09-07 19:18:52.107824882 +0200
@@ -70,7 +70,7 @@ char *getMouseData(int fd, Gpm_Type *typ
if((i=(which_mouse->m_type)->packetlen-howmany)) /* still to get */
do {
- j = read(fd,edata-i,i); /* edata is pointer just after data */
+ j = read(fd,edata-i,howmany); /* edata is pointer just after data */
if (kd_mode!=KD_TEXT && fifofd != -1 && opt_rawrep && j > 0)
write(fifofd, edata-i, j);
i -= j;