aboutsummaryrefslogtreecommitdiffhomepage
path: root/input
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2014-04-06 18:23:25 +0000
committerGravatar wm4 <wm4@nowhere>2014-04-10 00:08:08 +0200
commit39b2e206985d5adf99f182f9338d5267c36fea30 (patch)
tree9d4f03b89f9a6edd96513ca00b136d9b6dbb670a /input
parenta20aa15969794e2a61e1273af9ffa8efea140c03 (diff)
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? git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37132 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'input')
-rw-r--r--input/joystick.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/input/joystick.c b/input/joystick.c
index 680c8d6a68..e119fc37c8 100644
--- a/input/joystick.c
+++ b/input/joystick.c
@@ -113,7 +113,7 @@ static int mp_input_joystick_read(void *pctx, int fd) {
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;