Skip to content

Commit

Permalink
Don't let CodeLocals be nullable in reference finding code
Browse files Browse the repository at this point in the history
Co-authored-by: zivmaor <[email protected]>
  • Loading branch information
Dobby233Liu and zivmaor committed Jan 9, 2025
1 parent 0ba0f09 commit a291e8f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ IEnumerable<object[]> GetExtnFunctions()
if (objSrc is not UndertaleString obj)
return null;

var codeLocals = data.CodeLocals?.Where(x => x.Name == obj || x.Locals.Any(l => l.Name == obj));
var codeLocals = data.CodeLocals.Where(x => x.Name == obj || x.Locals.Any(l => l.Name == obj));
if (codeLocals.Any())
return new() { { "Code locals", checkOne ? codeLocals.ToEmptyArray() : codeLocals.ToArray() } };
else
Expand Down

0 comments on commit a291e8f

Please sign in to comment.