- fixed incorrect extension of overridden function prototype

Prototype of overridden function with optional argument(s) missing could extend unrelated prototype of previously defined function when their arguments and return value(s) match

https://forum.zdoom.org/viewtopic.php?t=71340
This commit is contained in:
alexey.lysiuk 2021-02-04 12:00:06 +02:00 committed by Christoph Oelckers
commit 6bc82bdeff
2 changed files with 8 additions and 2 deletions

View file

@ -2486,6 +2486,8 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool
{
newfunc->ArgFlags.Push(sym->Variants[0].ArgFlags[i]);
}
newfunc->Proto = sym->Variants[0].Proto;
}
}
}