Fixed formatting, added actual count to SDL error message

Sam Lantinga 2018-01-17 13:12:39 -08:00
parent f9bdce61e1
commit 509db8afbd
1 changed files with 7 additions and 9 deletions

View File

@ -152,18 +152,14 @@ SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
unsigned nameCount, unsigned nameCount,
const char *const *names) const char *const *names)
{ {
if(userNames) if (userNames) {
{ unsigned i;
unsigned int i;
if(*userCount < nameCount) if (*userCount < nameCount) {
{ SDL_SetError("Output array for SDL_Vulkan_GetInstanceExtensions needs to be at least %d big", nameCount);
SDL_SetError(
"Ouput array for SDL_Vulkan_GetInstanceExtensions is too small");
return SDL_FALSE; return SDL_FALSE;
} }
for(i = 0; i < nameCount; i++) for (i = 0; i < nameCount; i++) {
{
userNames[i] = names[i]; userNames[i] = names[i];
} }
} }
@ -172,3 +168,5 @@ SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
} }
#endif #endif
/* vi: set ts=4 sw=4 expandtab: */