Fixed code generation for vector parameters with default values

https://forum.zdoom.org/viewtopic.php?t=56915
This commit is contained in:
alexey.lysiuk 2017-06-16 11:58:24 +03:00
parent 478d72b37b
commit eda55b25ee

View file

@ -2555,7 +2555,6 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool
else else
{ {
auto cnst = static_cast<FxConstant *>(x); auto cnst = static_cast<FxConstant *>(x);
hasdefault = true;
switch (type->GetRegType()) switch (type->GetRegType())
{ {
case REGT_INT: case REGT_INT:
@ -2583,6 +2582,8 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool
break; break;
} }
} }
hasdefault = true;
} }
if (x != nullptr) delete x; if (x != nullptr) delete x;
} }