From 5682c4177875ee2247995ec8dee36e095d6f15c0 Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Sun, 6 Oct 2019 22:25:37 -0700 Subject: [PATCH] Fix buggy preprocessor conditional --- sc2/src/libs/input/sdl/input.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sc2/src/libs/input/sdl/input.c b/sc2/src/libs/input/sdl/input.c index 7ba355af8..1cbd6c14f 100644 --- a/sc2/src/libs/input/sdl/input.c +++ b/sc2/src/libs/input/sdl/input.c @@ -33,7 +33,7 @@ static int kbdhead=0, kbdtail=0; static UniChar kbdbuf[KBDBUFSIZE]; static UniChar lastchar; -#ifdef SDL_MAJOR_VERSION == 1 +#if SDL_MAJOR_VERSION == 1 static unsigned int num_keys = 0; static int *kbdstate = NULL; // Holds all SDL keys +1 for holding invalid values @@ -280,7 +280,9 @@ TFB_UninitInput (void) { VControl_Uninit (); HFree (controls); +#if SDL_MAJOR_VERSION == 1 HFree (kbdstate); +#endif } void