浏览代码

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

Alexander Koblov 12 年之前
父节点
当前提交
b0025801b7
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 4 4
      sdk/wcxplugin.pas
  2. 2 2
      src/uwcxmodule.pas

+ 4 - 4
sdk/wcxplugin.pas

@@ -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,

+ 2 - 2
src/uwcxmodule.pas

@@ -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);