Mercurial > mplayer.hg
changeset 37036:e73d13d7741e
joystick: Fix incorrect pointer offset code.
I have some doubts that short reads are even allowed/
possible for /dev/js*, does someone know for sure?
author | reimar |
---|---|
date | Sun, 06 Apr 2014 18:23:25 +0000 |
parents | ef4a44d32a25 |
children | 5ae43d2a425d |
files | input/joystick.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/input/joystick.c Sun Apr 06 18:18:01 2014 +0000 +++ b/input/joystick.c Sun Apr 06 18:23:25 2014 +0000 @@ -95,7 +95,7 @@ int l=0; while((unsigned int)l < sizeof(struct js_event)) { - int r = read(fd,&ev+l,sizeof(struct js_event)-l); + int r = read(fd,((char*)&ev)+l,sizeof(struct js_event)-l); if(r <= 0) { if(errno == EINTR) continue;