- fixed calling a function on string CVar

https://forum.zdoom.org/viewtopic.php?t=66768
This commit is contained in:
alexey.lysiuk 2020-01-19 14:48:38 +02:00 committed by Christoph Oelckers
parent 5a19010699
commit a05a5a8f00

View file

@ -6829,7 +6829,7 @@ FxExpression *FxCVar::Resolve(FCompileContext &ctx)
ExpEmit FxCVar::Emit(VMFunctionBuilder *build)
{
ExpEmit dest(build, ValueType->GetRegType());
ExpEmit dest(build, CVar->GetRealType() == CVAR_String ? REGT_STRING : ValueType->GetRegType());
ExpEmit addr(build, REGT_POINTER);
int nul = build->GetConstantInt(0);
switch (CVar->GetRealType())