Forráskód Böngészése

* fixed (harmless) range error in cross-endian crosscompiling code for
parsing constant sets

git-svn-id: trunk@13785 -

Jonas Maebe 16 éve
szülő
commit
606b7f4f80
1 módosított fájl, 6 hozzáadás és 4 törlés
  1. 6 4
      compiler/ncgcon.pas

+ 6 - 4
compiler/ncgcon.pas

@@ -441,10 +441,12 @@ implementation
           else
             begin
               location.value:=swapendian(Pcardinal(value_set)^);
-              location.value:= reverse_byte (location.value         and $ff)         or
-                              (reverse_byte((location.value shr  8) and $ff) shl  8) or
-                              (reverse_byte((location.value shr 16) and $ff) shl 16) or
-                              (reverse_byte((location.value shr 24) and $ff) shl 24);
+              location.value:=aint(
+                                 reverse_byte (location.value         and $ff)         or
+                                (reverse_byte((location.value shr  8) and $ff) shl  8) or
+                                (reverse_byte((location.value shr 16) and $ff) shl 16) or
+                                (reverse_byte((location.value shr 24) and $ff) shl 24)
+                              );
             end;
           if (target_info.endian=endian_big) then
             location.value:=location.value shr (32-resultdef.size*8);