video: fixed compiler warning on Visual Studio.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 11 Jun 2019 02:14:59 -0400
changeset 12826bc7022754e83
parent 12825 4fb5e61382b7
child 12827 9600f26ce4be
video: fixed compiler warning on Visual Studio.
src/video/SDL_vulkan_utils.c
     1.1 --- a/src/video/SDL_vulkan_utils.c	Tue Jun 11 02:08:31 2019 -0400
     1.2 +++ b/src/video/SDL_vulkan_utils.c	Tue Jun 11 02:14:59 2019 -0400
     1.3 @@ -24,6 +24,8 @@
     1.4  #include "SDL_error.h"
     1.5  #include "SDL_log.h"
     1.6  
     1.7 +/* !!! FIXME: this file doesn't match coding standards for SDL (brace position, etc). */
     1.8 +
     1.9  #if SDL_VIDEO_VULKAN
    1.10  
    1.11  const char *SDL_Vulkan_GetResultString(VkResult result)
    1.12 @@ -274,7 +276,7 @@
    1.13          SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Number of display properties for device %u: %u",
    1.14                  physicalDeviceIndex, displayPropertiesCount);
    1.15  
    1.16 -        if (displayId < 0 || displayId >= displayPropertiesCount)
    1.17 +        if ( (displayId < 0) || (((uint32_t) displayId) >= displayPropertiesCount) )
    1.18          {
    1.19              /* Display id specified was higher than number of available displays, move to next physical device. */
    1.20              displayId -= displayPropertiesCount;