Skip to content

Commit

Permalink
Fix local functions sometimes having no type
Browse files Browse the repository at this point in the history
  • Loading branch information
RA-Kooi committed Dec 31, 2021
1 parent 404bb4f commit 57e0f1e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DwarfOne2C/Parsing/CompilationUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 57e0f1e

Please sign in to comment.