fix: corrected mistake in implementation of reverse lookup

This commit is contained in:
zaaarf 2023-02-07 14:36:26 +01:00
parent 764ff58eaa
commit 53c8d23cd2
No known key found for this signature in database
GPG key ID: 82240E075E31FA4C

View file

@ -94,8 +94,10 @@ public class PatternMatcher {
break;
} else break;
}
if(first != null && last != null)
return new InsnSequence(first, last);
if(first != null && last != null) {
if(reverse) return new InsnSequence(last, first);
else return new InsnSequence(first, last);
}
}
throw new PatternNotFoundException("Failed to find pattern!");
}