From 39927dccaba7ee641b7103d2cf8fd9e3c8050017 Mon Sep 17 00:00:00 2001 From: Chronos Ouroboros Date: Fri, 1 Nov 2019 18:38:19 -0300 Subject: [PATCH] Fixed a bug in the flagdef processing code. --- src/scripting/zscript/zcc_compile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index 76c366d08d..1af94cf484 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -1505,7 +1505,7 @@ bool ZCCCompiler::CompileFlagDefs(PClass *type, TArray &Propertie { Error(p, "Variable %s not found in %s", referenced.GetChars(), type->TypeName.GetChars()); } - if (!field->Type->isInt() || field->Type->Size != 4) + else if (!field->Type->isInt() || field->Type->Size != 4) { Error(p, "Variable %s in %s must have a size of 4 bytes for use as flag storage", referenced.GetChars(), type->TypeName.GetChars()); }