From 48ea64442fbe3989158e7f92a9af11c95143b963 Mon Sep 17 00:00:00 2001
From: peter <peter@freepascal.org>
Date: Wed, 29 Oct 2003 21:00:34 +0000
Subject: [PATCH]   * fixed a:=copy(b)

---
 rtl/inc/dynarr.inc | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/rtl/inc/dynarr.inc b/rtl/inc/dynarr.inc
index 18c1432c43..493e396529 100644
--- a/rtl/inc/dynarr.inc
+++ b/rtl/inc/dynarr.inc
@@ -274,9 +274,9 @@ procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer;
      realpsrc:=pdynarray(psrc-sizeof(tdynarray));
      { skip kind and name }
      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 }
-     if (lowidx=-1) and (highidx=-1) then
+     if (lowidx=-1) and (highidx=-3) then
       begin
         lowidx:=0;
         highidx:=realpsrc^.high;
@@ -302,7 +302,10 @@ procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer;
 
 {
   $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>, ...)
 
   Revision 1.21  2002/11/26 23:02:07  peter