From af17864968a572f109b96eb7905e3c79470b5275 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 0e6b179f0..655b39ac6 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -1612,7 +1612,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()); }