Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Update SDL_InvalidParamError to take param name; add additional fuzze…
…r function; add new tests to keyboard test suite; improve surface test suite
  • Loading branch information
ferzkopp committed Jan 13, 2013
1 parent 0cd120a commit e5dbceef22077a6ec91d13753ff6cddba3fe09ee

File 4 of 10 in e5dbcee

@@ -895,17 +895,20 @@ SDL_Scancode SDL_GetScancodeFromName(const char *name)
int i;

if (!name || !*name) {
SDL_InvalidParamError("name");
return SDL_SCANCODE_UNKNOWN;
}

for (i = 0; i < SDL_arraysize(SDL_scancode_names); ++i) {
if (!SDL_scancode_names[i]) {
continue;
}
}
if (SDL_strcasecmp(name, SDL_scancode_names[i]) == 0) {
return (SDL_Scancode)i;
}
}

SDL_InvalidParamError("name");
return SDL_SCANCODE_UNKNOWN;
}

0 comments on commit e5dbcee

Please sign in to comment.