Browse Source

wayland: Wayland_Vulkan_GetInstanceExtensions didn't set the count variable.

Fixes #8468.
Ryan C. Gordon 1 year ago
parent
commit
780b6612a9
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/video/wayland/SDL_waylandvulkan.c

+ 6 - 2
src/video/wayland/SDL_waylandvulkan.c

@@ -118,12 +118,16 @@ void Wayland_Vulkan_UnloadLibrary(SDL_VideoDevice *_this)
     }
 }
 
-char const* const* Wayland_Vulkan_GetInstanceExtensions(SDL_VideoDevice *_this,
-                                              Uint32 *count)
+char const* const* Wayland_Vulkan_GetInstanceExtensions(SDL_VideoDevice *_this, Uint32 *count)
 {
     static const char *const extensionsForWayland[] = {
         VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME
     };
+
+    if (count) {
+        *count = SDL_arraysize(extensionsForWayland);
+    }
+
     return extensionsForWayland;
 }