From 6d1d492faccc471099f1245878b470aacf3d6ecf Mon Sep 17 00:00:00 2001 From: Meep-Eep Date: Mon, 25 Jan 2010 19:16:57 +0000 Subject: [PATCH] Fix warning. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3520 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/libs/input/sdl/input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sc2/src/libs/input/sdl/input.c b/sc2/src/libs/input/sdl/input.c index 809419a91..d4f07f548 100644 --- a/sc2/src/libs/input/sdl/input.c +++ b/sc2/src/libs/input/sdl/input.c @@ -35,7 +35,7 @@ static int kbdhead=0, kbdtail=0; static UniChar kbdbuf[KBDBUFSIZE]; static UniChar lastchar; -static int num_keys = 0; +static unsigned int num_keys = 0; static int *kbdstate = NULL; // Holds all SDL keys +1 for holding invalid values @@ -355,7 +355,7 @@ ProcessInputEvent (const SDL_Event *Event) SDLKey k = Event->key.keysym.sym; UniChar map_key = Event->key.keysym.unicode; - if (k < 0 || k > num_keys) + if (k > num_keys) k = num_keys; // for unknown keys if (Event->type == SDL_KEYDOWN)