Browse Source

* fixed a bug in the Z80 internal linker when reading symbol offsets from .rel files

git-svn-id: trunk@45622 -
nickysn 5 years ago
parent
commit
5816a4a940
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/ogrel.pas

+ 2 - 2
compiler/ogrel.pas

@@ -1014,7 +1014,7 @@ implementation
                           InputError('Invalid symbol record');
                           InputError('Invalid symbol record');
                           exit;
                           exit;
                         end;
                         end;
-                      if not TryStrToInt('$'+Copy(s,4,Length(s)-4),SymbolOfs) then
+                      if not TryStrToInt('$'+Copy(s,4,Length(s)-3),SymbolOfs) then
                         begin
                         begin
                           InputError('Invalid symbol offset');
                           InputError('Invalid symbol offset');
                           exit;
                           exit;
@@ -1027,7 +1027,7 @@ implementation
                                 InputError('Public symbol defined outside any area');
                                 InputError('Public symbol defined outside any area');
                                 exit;
                                 exit;
                               end;
                               end;
-                            if (SymbolOfs<0) or (SymbolOfs>=CurrSec.Size) then
+                            if (SymbolOfs<0) or (SymbolOfs>CurrSec.Size) then
                               begin
                               begin
                                 InputError('Public symbol offset outside the range of the current area');
                                 InputError('Public symbol offset outside the range of the current area');
                                 exit;
                                 exit;