diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c index ef0838cb2..086a34041 100644 --- a/test/testgamecontroller.c +++ b/test/testgamecontroller.c @@ -820,7 +820,7 @@ main(int argc, char *argv[]) } } if (argv[i] && *argv[i] != '-') { - controller_index = SDL_atoi(argv[1]); + controller_index = SDL_atoi(argv[i]); break; } }