- 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 drfrag
parent f42f20ccd3
commit a09d8e40f1

View file

@ -6831,7 +6831,7 @@ FxExpression *FxCVar::Resolve(FCompileContext &ctx)
ExpEmit FxCVar::Emit(VMFunctionBuilder *build) 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); ExpEmit addr(build, REGT_POINTER);
int nul = build->GetConstantInt(0); int nul = build->GetConstantInt(0);
switch (CVar->GetRealType()) switch (CVar->GetRealType())