src/events/SDL_keyboard.c
changeset 6811 60d95fcfaf3c
parent 6803 fbe83a6d10fa
child 6813 b21879e67db2
     1.1 --- a/src/events/SDL_keyboard.c	Sat Jan 12 14:06:58 2013 -0500
     1.2 +++ b/src/events/SDL_keyboard.c	Sat Jan 12 22:58:12 2013 -0800
     1.3 @@ -895,17 +895,20 @@
     1.4  	int i;
     1.5  
     1.6  	if (!name || !*name) {
     1.7 +	        SDL_InvalidParamError("name");
     1.8  		return SDL_SCANCODE_UNKNOWN;
     1.9  	}
    1.10  
    1.11  	for (i = 0; i < SDL_arraysize(SDL_scancode_names); ++i) {
    1.12  		if (!SDL_scancode_names[i]) {
    1.13  			continue;
    1.14 -		}
    1.15 +		}		
    1.16  		if (SDL_strcasecmp(name, SDL_scancode_names[i]) == 0) {
    1.17  			return (SDL_Scancode)i;
    1.18  		}
    1.19  	}
    1.20 +
    1.21 +	SDL_InvalidParamError("name");
    1.22  	return SDL_SCANCODE_UNKNOWN;
    1.23  }
    1.24