From de5ff4a4cc0efba7675566c5de84cd0e3e282331 Mon Sep 17 00:00:00 2001 From: Simon Judd Date: Mon, 6 May 2019 12:17:02 +0930 Subject: [PATCH] Fix case issues with ZScript defaults blocks Need to convert names to lowercase since it's case-insensitive Fix #1038 --- src/Game/ZScript.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Game/ZScript.cpp b/src/Game/ZScript.cpp index 05c8e7193..1ca4cfac6 100644 --- a/src/Game/ZScript.cpp +++ b/src/Game/ZScript.cpp @@ -901,9 +901,9 @@ bool Class::parseDefaults(vector& defaults) while (t < count) { if (statement.tokens[t] == '+') - default_properties_[statement.tokens[++t]] = true; + default_properties_[statement.tokens[++t].Lower()] = true; else if (statement.tokens[t] == '-') - default_properties_[statement.tokens[++t]] = false; + default_properties_[statement.tokens[++t].Lower()] = false; else break; @@ -926,11 +926,11 @@ bool Class::parseDefaults(vector& defaults) // so stuff like arithmetic expressions or comma separated lists won't // really work properly yet if (t + 1 < count) - default_properties_[name] = statement.tokens[t + 1]; + default_properties_[name.Lower()] = statement.tokens[t + 1]; // Name only (no value), set as boolean true else if (t < count) - default_properties_[name] = true; + default_properties_[name.Lower()] = true; } return true;