From 583ee23a15bbb97ef7306eea1ede021078b46d73 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 13 Dec 2020 17:05:28 -0600 Subject: [PATCH] Fix regex in readNamedIndexCArray() that disallowed 0 in the name --- CHANGELOG.md | 1 + src/core/parseutil.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e047ca0..ddd94760 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d - Fix porymap icon not showing on window or panel on Linux. - The main window can now be resized to fit on lower resolution displays. - Zooming the map in/out will now focus on the cursor. +- Fix bug where object event sprites whose name contained a 0 character would display the placeholder "N" picture. ## [4.3.1] - 2020-07-17 ### Added diff --git a/src/core/parseutil.cpp b/src/core/parseutil.cpp index 80a4cf6c..9c4f1f2d 100644 --- a/src/core/parseutil.cpp +++ b/src/core/parseutil.cpp @@ -337,7 +337,7 @@ QMap ParseUtil::readNamedIndexCArray(QString filename, QString QRegularExpression re_text(QString(R"(\b%1\b\s*(\[?[^\]]*\])?\s*=\s*\{([^\}]*)\})").arg(label)); QString body = re_text.match(text).captured(2).replace(QRegularExpression("\\s*"), ""); - QRegularExpression re("\\[(?[A-Za-z1-9_]*)\\]=(?&?[A-Za-z1-9_]*)"); + QRegularExpression re("\\[(?[A-Za-z0-9_]*)\\]=(?&?[A-Za-z0-9_]*)"); QRegularExpressionMatchIterator iter = re.globalMatch(body); while (iter.hasNext()) {