mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
Fixed: compile-time error in vararg function call would result in a crash.
This commit is contained in:
parent
97ad1496b3
commit
13c6d16905
1 changed files with 8 additions and 6 deletions
|
@ -8202,14 +8202,16 @@ FxExpression *FxVMFunctionCall::Resolve(FCompileContext& ctx)
|
||||||
{
|
{
|
||||||
// only cast implicit-string types for vararg, leave everything else as-is
|
// only cast implicit-string types for vararg, leave everything else as-is
|
||||||
// this was outright copypasted from FxFormat
|
// this was outright copypasted from FxFormat
|
||||||
ArgList[i] = ArgList[i]->Resolve(ctx);
|
x = ArgList[i]->Resolve(ctx);
|
||||||
if (ArgList[i]->ValueType == TypeName ||
|
if (x)
|
||||||
ArgList[i]->ValueType == TypeSound)
|
|
||||||
{
|
{
|
||||||
x = new FxStringCast(ArgList[i]);
|
if (x->ValueType == TypeName ||
|
||||||
x = x->Resolve(ctx);
|
x->ValueType == TypeSound)
|
||||||
|
{
|
||||||
|
x = new FxStringCast(ArgList[i]);
|
||||||
|
x = x->Resolve(ctx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else x = ArgList[i];
|
|
||||||
}
|
}
|
||||||
else if (!(flag & (VARF_Ref|VARF_Out)))
|
else if (!(flag & (VARF_Ref|VARF_Out)))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue