Browse Source

* in the vecnode, when indexing a pointer[], convert right to
tpointerdef.pointer_arithmetic_int_type instead of sinttype

git-svn-id: trunk@28269 -

nickysn 11 năm trước cách đây
mục cha
commit
4b1e5f1c9a
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      compiler/nmem.pas

+ 3 - 1
compiler/nmem.pas

@@ -946,8 +946,10 @@ implementation
                else
                else
                  {Convert indexes into dynamically allocated strings to aword.}
                  {Convert indexes into dynamically allocated strings to aword.}
                  inserttypeconv(right,uinttype);
                  inserttypeconv(right,uinttype);
+             pointerdef:
+               inserttypeconv(right,tpointerdef(left.resultdef).pointer_arithmetic_int_type);
              else
              else
-               {Others, i.e. pointer indexes to aint.}
+               {Others, (are there any?) indexes to aint.}
                inserttypeconv(right,sinttype);
                inserttypeconv(right,sinttype);
            end;
            end;