mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 20:29:14 +02:00
* fixed a:=copy(b)
This commit is contained in:
parent
fae3eaf83d
commit
48ea64442f
@ -274,9 +274,9 @@ procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer;
|
|||||||
realpsrc:=pdynarray(psrc-sizeof(tdynarray));
|
realpsrc:=pdynarray(psrc-sizeof(tdynarray));
|
||||||
{ skip kind and name }
|
{ skip kind and name }
|
||||||
inc(pointer(ti),ord(pdynarraytypeinfo(ti)^.namelen));
|
inc(pointer(ti),ord(pdynarraytypeinfo(ti)^.namelen));
|
||||||
{ -1, -1 is used to copy the whole array like a:=copy(b);, so
|
{ -1, -1 (highidx=lowidx-1-1=-3) is used to copy the whole array like a:=copy(b);, so
|
||||||
update the lowidx and highidx with the values from psrc }
|
update the lowidx and highidx with the values from psrc }
|
||||||
if (lowidx=-1) and (highidx=-1) then
|
if (lowidx=-1) and (highidx=-3) then
|
||||||
begin
|
begin
|
||||||
lowidx:=0;
|
lowidx:=0;
|
||||||
highidx:=realpsrc^.high;
|
highidx:=realpsrc^.high;
|
||||||
@ -302,7 +302,10 @@ procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.22 2003-10-25 22:52:07 florian
|
Revision 1.23 2003-10-29 21:00:34 peter
|
||||||
|
* fixed a:=copy(b)
|
||||||
|
|
||||||
|
Revision 1.22 2003/10/25 22:52:07 florian
|
||||||
* fixed copy(<dynarray>, ...)
|
* fixed copy(<dynarray>, ...)
|
||||||
|
|
||||||
Revision 1.21 2002/11/26 23:02:07 peter
|
Revision 1.21 2002/11/26 23:02:07 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user