From 780b6612a925abb5c2c2020c44c2a54f53100801 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 4 Nov 2023 14:53:24 -0400 Subject: [PATCH] wayland: Wayland_Vulkan_GetInstanceExtensions didn't set the count variable. Fixes #8468. --- src/video/wayland/SDL_waylandvulkan.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/video/wayland/SDL_waylandvulkan.c b/src/video/wayland/SDL_waylandvulkan.c index 3e372bd2a6..b07aaf95e8 100644 --- a/src/video/wayland/SDL_waylandvulkan.c +++ b/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; }