From f13bc4f4b1712e6152fa9e872dccf55127204d05 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 21 Feb 2023 00:42:12 +0900 Subject: [PATCH] [vkgen] Allow mixed dictionary .type parsing --- libs/video/renderer/vulkan/vkgen/vkstruct.r | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/video/renderer/vulkan/vkgen/vkstruct.r b/libs/video/renderer/vulkan/vkgen/vkstruct.r index cacd19acc..0194aaeaa 100644 --- a/libs/video/renderer/vulkan/vkgen/vkstruct.r +++ b/libs/video/renderer/vulkan/vkgen/vkstruct.r @@ -126,8 +126,10 @@ write_function_tail (Struct *self) static void write_parse_type (Struct *self) { - fprintf (output_file, "\t\treturn PL_ParseStruct (%s_fields, item, data, " - "messages, context);\n", [self outname]); + fprintf (output_file, "\t\tif (!PL_ParseStruct (%s_fields, item, data, " + "messages, context)) {\n", [self outname]); + fprintf (output_file, "\t\t\treturn 0;\n"); + fprintf (output_file, "\t\t}\n"); } static void