Initialise variable 'start' at the beginning

This commit is contained in:
Pradana AUMARS 2021-06-28 13:43:41 +02:00
parent 0d522fb521
commit c56480a33b

View File

@ -6,6 +6,7 @@
int main (int argc, char* args[]) int main (int argc, char* args[])
{ {
Pong *p = NULL; Pong *p = NULL;
int start = false;
if (SDL_Init(SDL_INIT_VIDEO) < 0) if (SDL_Init(SDL_INIT_VIDEO) < 0)
{ {
@ -16,7 +17,6 @@ int main (int argc, char* args[])
p = Pong_init(); p = Pong_init();
Pong_render(p); Pong_render(p);
int start = false;
while (!start) { while (!start) {
printf("Press any key to start...\r"); printf("Press any key to start...\r");
fflush(stdout); fflush(stdout);