From 57e0f1e082d2f5b3b96f944e3c2019c2fc072cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Kooi?= <48814281+RA-Kooi@users.noreply.github.com> Date: Fri, 31 Dec 2021 17:32:49 +0100 Subject: [PATCH] Fix local functions sometimes having no type --- DwarfOne2C/Parsing/CompilationUnit.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DwarfOne2C/Parsing/CompilationUnit.cs b/DwarfOne2C/Parsing/CompilationUnit.cs index aa3061d..ef7690b 100644 --- a/DwarfOne2C/Parsing/CompilationUnit.cs +++ b/DwarfOne2C/Parsing/CompilationUnit.cs @@ -346,7 +346,9 @@ void Recurse(Tag parent, int depth) } // Fixup missing type of functions - if(tag.tagType == TagType.GlobalFunc && tag.typeID == 0) + if((tag.tagType == TagType.GlobalFunc + || tag.tagType == TagType.CULocalFunc) + && tag.typeID == 0) { tag.typeID = (int)Type.BuiltInType.Void; }