Browse Source

* avoid crash when multiple references to one text symbol entry are used

git-svn-id: trunk@3339 -
florian 19 năm trước cách đây
mục cha
commit
f073b1288d
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      compiler/arm/aasmcpu.pas

+ 3 - 1
compiler/arm/aasmcpu.pas

@@ -648,7 +648,9 @@ implementation
                       begin
                       begin
                         { pc relative symbol? }
                         { pc relative symbol? }
                         curdatatai:=tai(taicpu(curtai).oper[curop]^.ref^.symboldata);
                         curdatatai:=tai(taicpu(curtai).oper[curop]^.ref^.symboldata);
-                        if assigned(curdatatai) then
+                        if assigned(curdatatai) and
+                          { move only if we're at the first reference of a label }
+                          (taicpu(curtai).oper[curop]^.ref^.offset=0) then
                           begin
                           begin
                             { if yes, insert till next symbol }
                             { if yes, insert till next symbol }
                             repeat
                             repeat