Skip to content

Commit

Permalink
Allow function arg macro types to be null again
Browse files Browse the repository at this point in the history
  • Loading branch information
colinator27 committed Jul 10, 2024
1 parent a96848d commit 7b8fbae
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ internal class IMacroTypeConverter(GameSpecificRegistry registry) : JsonConverte
if (reader.TokenType == JsonTokenType.StartArray)
{
// Read array of macro types as function arguments macro type
List<IMacroType> subMacroTypes = [];
List<IMacroType?> subMacroTypes = [];
while (reader.Read())
{
if (reader.TokenType == JsonTokenType.EndArray)
{
return new FunctionArgsMacroType(subMacroTypes);
}

subMacroTypes.Add(Read(ref reader, typeToConvert, options) ?? throw new JsonException());
subMacroTypes.Add(Read(ref reader, typeToConvert, options));
}

throw new JsonException();
Expand Down

0 comments on commit 7b8fbae

Please sign in to comment.