fix incbin parsing for multiple matches

This commit is contained in:
garakmon 2023-01-24 13:37:02 -05:00
parent 0e93e28f1b
commit 70980f5e42

View file

@ -263,7 +263,7 @@ QString ParseUtil::readCIncbin(const QString &filename, const QString &label) {
this->text = readTextFile(this->root + "/" + filename); this->text = readTextFile(this->root + "/" + filename);
int start = this->text.indexOf(label); int start = this->text.indexOf(QRegularExpression(label + "\b"));
if (start < 0) return path; if (start < 0) return path;
int end = this->text.indexOf(';', start); int end = this->text.indexOf(';', start);
QString incbinText = this->text.mid(start, end - start); QString incbinText = this->text.mid(start, end - start);