Browse Source

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

git-svn-id: trunk@3339 -
florian 19 years ago
parent
commit
f073b1288d
1 changed files with 3 additions and 1 deletions
  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