|
@@ -1190,13 +1190,13 @@ function SwapEndian(const AValue: SmallInt): SmallInt;{$ifdef SYSTEMINLINE}inlin
|
|
|
{ is turned into "longint(AValue) shr 8", so if AValue < 0 then }
|
|
|
{ the sign bits from the upper 16 bits are shifted in rather than }
|
|
|
{ zeroes. }
|
|
|
- Result := SmallInt((Word(AValue) shr 8) or (Word(AValue) shl 8));
|
|
|
+ Result := ((Word(AValue) shr 8) or (Word(AValue) shl 8)) and $ffff;
|
|
|
end;
|
|
|
|
|
|
|
|
|
function SwapEndian(const AValue: Word): Word;{$ifdef SYSTEMINLINE}inline;{$endif}
|
|
|
begin
|
|
|
- Result := Word((AValue shr 8) or (AValue shl 8));
|
|
|
+ Result := ((AValue shr 8) or (AValue shl 8)) and $ffff;
|
|
|
end;
|
|
|
|
|
|
(*
|