Browse Source

* Fix set endian handling.

git-svn-id: trunk@7918 -
daniel 18 years ago
parent
commit
b64558620f
1 changed files with 8 additions and 9 deletions
  1. 8 9
      compiler/ppu.pas

+ 8 - 9
compiler/ppu.pas

@@ -710,24 +710,23 @@ end;
 
 
 procedure tppufile.getsmallset(var b);
 procedure tppufile.getsmallset(var b);
 var
 var
-  l : longint;
+  i : longint;
 begin
 begin
-  l:=getlongint;
-  longint(b):=l;
+  getdata(b,4);
+  if change_endian then
+    for i:=0 to 3 do
+      Pbyte(@b)[i]:=reverse_byte(Pbyte(@b)[i]);
 end;
 end;
 
 
 
 
 procedure tppufile.getnormalset(var b);
 procedure tppufile.getnormalset(var b);
-type
-  SetLongintArray = Array [0..7] of longint;
 var
 var
   i : longint;
   i : longint;
 begin
 begin
+  getdata(b,32);
   if change_endian then
   if change_endian then
-    for i:=0 to 7 do
-      SetLongintArray(b)[i]:=getlongint
-  else
-    getdata(b,32);
+    for i:=0 to 31 do
+      Pbyte(@b)[i]:=reverse_byte(Pbyte(@b)[i]);
 end;
 end;