mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 21:29:40 +02:00
* Fix set endian handling.
git-svn-id: trunk@7918 -
This commit is contained in:
parent
8a0cc8c888
commit
b64558620f
@ -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;
|
getdata(b,4);
|
||||||
longint(b):=l;
|
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
|
||||||
if change_endian then
|
|
||||||
for i:=0 to 7 do
|
|
||||||
SetLongintArray(b)[i]:=getlongint
|
|
||||||
else
|
|
||||||
getdata(b,32);
|
getdata(b,32);
|
||||||
|
if change_endian then
|
||||||
|
for i:=0 to 31 do
|
||||||
|
Pbyte(@b)[i]:=reverse_byte(Pbyte(@b)[i]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user