mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
Does not include the end position of a block in findChildNodeAt()
This commit is contained in:
parent
bf58d2968a
commit
d46050a3a3
@ -739,7 +739,8 @@ class BranchManager {
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
private BranchNode findChildNodeAt( @Nonnull BranchNode parent, int codePosition ) {
|
private BranchNode findChildNodeAt( @Nonnull BranchNode parent, int codePosition ) {
|
||||||
for( BranchNode node : parent ) {
|
for( BranchNode node : parent ) {
|
||||||
if( node.startPos <= codePosition && codePosition <= node.endPos ) {
|
// the end position of a block is position of the first instruction outside of the block
|
||||||
|
if( node.startPos <= codePosition && codePosition < node.endPos ) {
|
||||||
return findChildNodeAt( node, codePosition );
|
return findChildNodeAt( node, codePosition );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user