mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 01:29:29 +02:00
* fixed pointer arithmetic errors
This commit is contained in:
parent
239db4ba9d
commit
405fb30652
@ -86,7 +86,7 @@ procedure fpc_dynarray_clear_internal(p : pointer;ti : pointer);
|
||||
{$endif FPC_ALIGNSRTTI}
|
||||
|
||||
elesize:=psizeint(ti)^;
|
||||
eletype:=pdynarraytypeinfo(ti+sizeof(sizeint));
|
||||
eletype:=pdynarraytypeinfo(pointer(ti)+sizeof(sizeint));
|
||||
|
||||
{ finalize all data }
|
||||
int_finalizearray(p+sizeof(tdynarray),eletype,pdynarray(p)^.high+1,
|
||||
@ -187,7 +187,7 @@ procedure fpc_dynarray_setlength(var p : pointer;pti : pointer;
|
||||
{$endif FPC_ALIGNSRTTI}
|
||||
|
||||
elesize:=psizeint(ti)^;
|
||||
eletype:=pdynarraytypeinfo(ti+sizeof(sizeint));
|
||||
eletype:=pdynarraytypeinfo(pointer(ti)+sizeof(sizeint));
|
||||
|
||||
{ determine new memory size }
|
||||
{ dims[dimcount-1] because the dimensions are in reverse order! (JM) }
|
||||
@ -325,7 +325,7 @@ procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer;
|
||||
{$endif FPC_ALIGNSRTTI}
|
||||
|
||||
elesize:=psizeint(ti)^;
|
||||
eletype:=pdynarraytypeinfo(ti+sizeof(sizeint));
|
||||
eletype:=pdynarraytypeinfo(pointer(ti)+sizeof(sizeint));
|
||||
|
||||
{ -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 }
|
||||
@ -355,7 +355,10 @@ procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.32 2004-11-06 15:29:19 florian
|
||||
Revision 1.33 2004-11-07 18:02:47 jonas
|
||||
* fixed pointer arithmetic errors
|
||||
|
||||
Revision 1.32 2004/11/06 15:29:19 florian
|
||||
* fixed fpc_dynarry_copy for arm/sparc
|
||||
|
||||
Revision 1.31 2004/11/03 10:54:36 florian
|
||||
|
Loading…
Reference in New Issue
Block a user