summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;