mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 20:46:24 +02:00
* do not crash in case of too many $push directives, resolves #39652
This commit is contained in:
parent
92a0640bcc
commit
54dccaaad1
@ -1204,8 +1204,9 @@ unit scandir;
|
||||
|
||||
begin
|
||||
if switchesstatestackpos < 1 then
|
||||
Message(scan_e_too_many_pop);
|
||||
|
||||
Message(scan_e_too_many_pop)
|
||||
else
|
||||
begin
|
||||
Dec(switchesstatestackpos);
|
||||
recordpendinglocalfullswitch(switchesstatestack[switchesstatestackpos].localsw);
|
||||
recordpendingverbosityfullswitch(switchesstatestack[switchesstatestackpos].verbosity);
|
||||
@ -1223,6 +1224,7 @@ unit scandir;
|
||||
out by using $Q- after a $push PM 2012-08-29 }
|
||||
// flushpendingswitchesstate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure dir_pointermath;
|
||||
begin
|
||||
|
7
tests/webtbf/tw39652.pp
Normal file
7
tests/webtbf/tw39652.pp
Normal file
@ -0,0 +1,7 @@
|
||||
{ %fail }
|
||||
program onepoptoomanycrash;
|
||||
{$PUSH}
|
||||
{$POP}
|
||||
{$POP}
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user