FIX: Bug [0000619] "Negative file size in archive"

This commit is contained in:
Alexander Koblov 2012-12-23 08:52:22 +00:00
commit b0025801b7
2 changed files with 6 additions and 6 deletions

View file

@ -135,11 +135,11 @@ type
THeaderDataEx=packed record
ArcName:array [0..1023] of char;
FileName:array [0..1023] of char;
Flags,
Flags:longint;
PackSize,
PackSizeHigh,
UnpSize,
UnpSizeHigh,
UnpSizeHigh:longword;
HostOS,
FileCRC,
FileTime,
@ -157,11 +157,11 @@ type
THeaderDataExW=packed record
ArcName:array [0..1023] of widechar;
FileName:array [0..1023] of widechar;
Flags,
Flags:longint;
PackSize,
PackSizeHigh,
UnpSize,
UnpSizeHigh,
UnpSizeHigh:longword;
HostOS,
FileCRC,
FileTime,

View file

@ -745,7 +745,7 @@ end;
constructor TWCXHeader.Create(const Data: PHeaderDataEx);
function Combine64(High, Low: Longint): Int64;
function Combine64(High, Low: LongWord): Int64;
begin
Result := Int64(High) shl (SizeOf(Int64) shl 2);
Result := Result + Int64(Low);
@ -770,7 +770,7 @@ end;
constructor TWCXHeader.Create(const Data: PHeaderDataExW);
function Combine64(High, Low: Longint): Int64;
function Combine64(High, Low: LongWord): Int64;
begin
Result := Int64(High) shl (SizeOf(Int64) shl 2);
Result := Result + Int64(Low);