From 59d17bdee046c763177f6d915032702e0528b306 Mon Sep 17 00:00:00 2001 From: Mark Callow Date: Fri, 22 Sep 2017 22:30:02 +0900 Subject: [PATCH] Avoid hitting ERR_MAX_STRLEN limit. --- src/video/SDL_vulkan_utils.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/video/SDL_vulkan_utils.c b/src/video/SDL_vulkan_utils.c index f849f68dc..abc6fd869 100644 --- a/src/video/SDL_vulkan_utils.c +++ b/src/video/SDL_vulkan_utils.c @@ -99,9 +99,13 @@ VkExtensionProperties *SDL_Vulkan_CreateInstanceExtensionsList( VkExtensionProperties *retval; if(result == VK_ERROR_INCOMPATIBLE_DRIVER) { + /* Avoid the ERR_MAX_STRLEN limit by passing part of the message + * as a string argument. + */ SDL_SetError( - "You probably don't have a working Vulkan driver installed: getting Vulkan " - "extensions failed: vkEnumerateInstanceExtensionProperties returned %s(%d)", + "You probably don't have a working Vulkan driver installed. %s %s %s(%d)", + "Getting Vulkan extensions failed:", + "vkEnumerateInstanceExtensionProperties returned", SDL_Vulkan_GetResultString(result), (int)result); return NULL;