mirror of
https://github.com/ZDoom/acc.git
synced 2025-03-14 04:10:41 +00:00
Merge pull request #29 from rhinoduck/recursive_calls
Fix wrong function index on some recursive calls
This commit is contained in:
commit
3071c321fa
1 changed files with 12 additions and 2 deletions
14
parse.c
14
parse.c
|
@ -825,8 +825,18 @@ static void OuterFunction(void)
|
|||
else
|
||||
{
|
||||
sym = SY_InsertGlobal(tk_String, SY_SCRIPTFUNC);
|
||||
sym->info.scriptFunc.address = (importing == IMPORT_Importing ? 0 : pc_Address);
|
||||
sym->info.scriptFunc.predefined = NO;
|
||||
if (importing == IMPORT_Importing)
|
||||
{
|
||||
sym->info.scriptFunc.address = 0;
|
||||
sym->info.scriptFunc.predefined = NO;
|
||||
}
|
||||
else
|
||||
{
|
||||
sym->info.scriptFunc.address = pc_Address;
|
||||
sym->info.scriptFunc.predefined = YES;
|
||||
// only for consistency with other speculated functions and pretty logs
|
||||
sym->info.scriptFunc.funcNumber = 0;
|
||||
}
|
||||
}
|
||||
defLine = tk_Line;
|
||||
|
||||
|
|
Loading…
Reference in a new issue