* fixed generic stack checking code (the stack pointer is already decreased

before FPC_STACKCHECK is called, so don't subtract the allocated size
    again when checking)

git-svn-id: trunk@12525 -
This commit is contained in:
Jonas Maebe 2009-01-08 18:05:11 +00:00
parent 75cbf8cacd
commit b7d461d0f0

View File

@ -708,7 +708,10 @@ begin
{ Avoid recursive calls when called from the exit routines } { Avoid recursive calls when called from the exit routines }
if StackError then if StackError then
exit; exit;
c := Sptr - (stack_size + STACK_MARGIN); { don't use sack_size, since the stack pointer has already been
decreased when this routine is called
}
c := Sptr - STACK_MARGIN;
if (c <= StackBottom) then if (c <= StackBottom) then
begin begin
StackError:=true; StackError:=true;