Skip to content

Commit

Permalink
Fixed formatting, added actual count to SDL error message
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 17, 2018
1 parent f9bdce6 commit 509db8a
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/video/SDL_vulkan_utils.c
Expand Up @@ -152,18 +152,14 @@ SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
unsigned nameCount,
const char *const *names)
{
if(userNames)
{
unsigned int i;
if (userNames) {
unsigned i;

if(*userCount < nameCount)
{
SDL_SetError(
"Ouput array for SDL_Vulkan_GetInstanceExtensions is too small");
if (*userCount < nameCount) {
SDL_SetError("Output array for SDL_Vulkan_GetInstanceExtensions needs to be at least %d big", nameCount);
return SDL_FALSE;
}
for(i = 0; i < nameCount; i++)
{
for (i = 0; i < nameCount; i++) {
userNames[i] = names[i];
}
}
Expand All @@ -172,3 +168,5 @@ SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
}

#endif

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit 509db8a

Please sign in to comment.