mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 23:09:38 +02:00
* give range error if setlength value < 0 and the array is not filled
git-svn-id: trunk@9758 -
This commit is contained in:
parent
037e6a2c11
commit
923aac0390
@ -169,6 +169,8 @@ procedure fpc_dynarray_setlength(var p : pointer;pti : pointer;
|
||||
{ not assigned yet? }
|
||||
if not(assigned(p)) then
|
||||
begin
|
||||
if dims[dimcount-1]<0 then
|
||||
HandleErrorFrame(201,get_frame);
|
||||
{ do we have to allocate memory? }
|
||||
if dims[dimcount-1] = 0 then
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user