diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index 0e6b179f00..655b39ac6e 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()); }