Skip to content

Conversation

@Nytra
Copy link
Contributor

@Nytra Nytra commented Jun 22, 2025

Problem: When calling CodeInstructionExtensions.LocalIndex, sometimes the operand is a LocalBuilder, currently the code does not handle this.

I came across this when I was trying to get the local index from a Stloc_S but the operand was not an int but actually a LocalBuilder. In that case you need to convert operand to LocalBuilder and take the LocalIndex from it. It makes sense for this extension to do this otherwise you need to do it yourself outside.

@Nytra Nytra changed the title Add LocalBuilder check to CodeInstructionExtensions.LocalIndex Add LocalBuilder checks to CodeInstructionExtensions.LocalIndex Jun 22, 2025
@pardeike pardeike merged commit aa65c00 into pardeike:master Jul 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants