mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-13 22:42:07 +00:00
Make sure maps in return type don't segfault
This commit is contained in:
parent
3fc195c5b2
commit
fad350ff80
1 changed files with 5 additions and 0 deletions
|
@ -2254,6 +2254,11 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool
|
|||
Error(f, "The return type of a function cannot be a dynamic array");
|
||||
break;
|
||||
}
|
||||
else if (type->isMap())
|
||||
{
|
||||
Error(f, "The return type of a function cannot be a map");
|
||||
break;
|
||||
}
|
||||
else if (type == TypeFVector2)
|
||||
{
|
||||
type = TypeVector2;
|
||||
|
|
Loading…
Reference in a new issue