From a240bf5038c5b3dd31ee4f60c5591a88a7c2b412 Mon Sep 17 00:00:00 2001 From: garak Date: Mon, 3 Jun 2019 23:48:39 -0400 Subject: [PATCH] allow spaces in C INCBINS --- src/core/parseutil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/parseutil.cpp b/src/core/parseutil.cpp index 9aa96b86..edfd0f81 100644 --- a/src/core/parseutil.cpp +++ b/src/core/parseutil.cpp @@ -243,7 +243,7 @@ QString ParseUtil::readCIncbin(QString filename, QString label) { "\\b%1\\b" "\\s*\\[?\\s*\\]?\\s*=\\s*" "INCBIN_[US][0-9][0-9]?" - "\\(\"([^\"]*)\"\\)").arg(label)); + "\\(\\s*\"([^\"]*)\"\\s*\\)").arg(label)); int pos = re->indexIn(text); if (pos != -1) { @@ -322,7 +322,7 @@ QStringList ParseUtil::readCArray(QString filename, QString label) { QStringList split = body.split(','); for (QString item : split) { item = item.trimmed(); - if (!item.contains(QRegularExpression("[^A-Za-z0-9_&()]"))) list.append(item); + if (!item.contains(QRegularExpression("[^A-Za-z0-9_&()\\s]"))) list.append(item); // do not print error info here because this is called dozens of times } }