Jelajahi Sumber

* m68k: don't attempt to copy less than 1 byte in g_concatcopy, this fixes tdfa7.pp on 68000 and removes some superfluous address processing on 68020+ in the same test

Karoly Balogh 3 tahun lalu
induk
melakukan
077a3f1892
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      compiler/m68k/cgcpu.pas

+ 3 - 0
compiler/m68k/cgcpu.pas

@@ -1772,6 +1772,9 @@ unit cgcpu;
          srcrefp,dstrefp : treference;
          srcrefp,dstrefp : treference;
          srcref,dstref : treference;
          srcref,dstref : treference;
       begin
       begin
+         if (len < 1) then
+           exit;
+
          if (len = 1) or
          if (len = 1) or
             ((len in [2,4]) and
             ((len in [2,4]) and
              not needs_unaligned(source.alignment,lentocgsize[len]) and
              not needs_unaligned(source.alignment,lentocgsize[len]) and