diff --git a/src/loop.c b/src/loop.c index 7e169e4e..d49b4d71 100644 --- a/src/loop.c +++ b/src/loop.c @@ -76,14 +76,15 @@ void loop_remove_fd(int fd) { int fdindex; for (int i=0;i 0) { memcpy(&fds[fdindex], &fds[numFds], sizeof(struct pollfd)); - memcpy(&fdHandlers[fdindex], &fdHandlers[numFds], sizeof(FdHandler*)); + memcpy(&fdHandlers[fdindex], &fdHandlers[numFds], sizeof(FdHandler)); } } diff --git a/src/main.c b/src/main.c index 037090cd..04b0c1d6 100644 --- a/src/main.c +++ b/src/main.c @@ -95,7 +95,7 @@ static void stream(PSERVER_DATA server, PCONFIGURATION config, enum platform sys #ifdef HAVE_SDL gamepads += sdl_gamepads; #endif - int gamepad_mask; + int gamepad_mask = 0; for (int i = 0; i < gamepads && i < 4; i++) gamepad_mask = (gamepad_mask << 1) + 1;