1
0
mirror of synced 2024-09-24 19:48:25 +02:00

fix(lang): fixes occurrence index in findSequnce built-in fucntion (#120)

This commit is contained in:
Philipp Kovalev 2021-01-09 20:48:34 +03:00 committed by GitHub
parent 02b3b94804
commit 575903f921
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ namespace hex::lang {
this->m_provider->read(offset, bytes.data(), bytes.size());
if (bytes == sequence) {
if (LITERAL_COMPARE(occurrenceIndex, occurrenceIndex < occurrences)) {
if (LITERAL_COMPARE(occurrenceIndex, occurrences < occurrenceIndex)) {
occurrences++;
continue;
}