diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index 01ece7544..349e1b011 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -1616,7 +1616,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()); }