Browse Source

* Fix bug #2091, destlen's of compress,compress2 and uncompress are now
VAR

marco 22 years ago
parent
commit
680d60cb40
1 changed files with 6 additions and 6 deletions
  1. 6 6
      packages/base/paszlib/paszlib.pas

+ 6 - 6
packages/base/paszlib/paszlib.pas

@@ -77,9 +77,9 @@ function deflateParams(var strm:TZstream; level:longint; strategy:longint):longi
 function inflateSetDictionary(var strm:TZStream;dictionary : pchar; dictLength:uInt):longint;
 function inflateSetDictionary(var strm:TZStream;dictionary : pchar; dictLength:uInt):longint;
 function inflateSync(var strm:TZStream):longint;
 function inflateSync(var strm:TZStream):longint;
 function inflateReset(var strm:TZStream):longint;
 function inflateReset(var strm:TZStream):longint;
-function compress(dest:pchar;destLen:uLongf; source : pchar; sourceLen:uLong):longint;
-function compress2(dest:pchar;destLen:uLongf; source : pchar; sourceLen:uLong; level:longint):longint;
-function uncompress(dest:pchar;destLen:uLongf; source : pchar; sourceLen:uLong):longint;
+function compress(dest:pchar;var destLen:uLongf; source : pchar; sourceLen:uLong):longint;
+function compress2(dest:pchar;var destLen:uLongf; source : pchar; sourceLen:uLong; level:longint):longint;
+function uncompress(dest:pchar;var destLen:uLongf; source : pchar; sourceLen:uLong):longint;
 function gzopen(path:pchar; mode:pchar):gzFile;
 function gzopen(path:pchar; mode:pchar):gzFile;
 function gzsetparams(Thefile:gzFile; level:longint; strategy:longint):longint;
 function gzsetparams(Thefile:gzFile; level:longint; strategy:longint):longint;
 function gzread(thefile:gzFile; buf : pointer; len:cardinal):longint;
 function gzread(thefile:gzFile; buf : pointer; len:cardinal):longint;
@@ -174,17 +174,17 @@ begin
   inflateReset:=zinflate.inflateReset(strm);
   inflateReset:=zinflate.inflateReset(strm);
 end;
 end;
 
 
-function compress(dest:pchar;destLen:uLongf; source : pchar; sourceLen:uLong):longint;
+function compress(dest:pchar;var destLen:uLongf; source : pchar; sourceLen:uLong):longint;
 begin
 begin
   compress:=zcompres.compress(pbytef(dest),destlen,pbytef(source),sourcelen);
   compress:=zcompres.compress(pbytef(dest),destlen,pbytef(source),sourcelen);
 end;
 end;
 
 
-function compress2(dest:pchar;destLen:uLongf; source : pchar; sourceLen:uLong; level:longint):longint;
+function compress2(dest:pchar;var destLen:uLongf; source : pchar; sourceLen:uLong; level:longint):longint;
 begin
 begin
   compress2:=zcompres.compress2(pbytef(dest),destlen,pbytef(source),sourcelen,level);
   compress2:=zcompres.compress2(pbytef(dest),destlen,pbytef(source),sourcelen,level);
 end;
 end;
 
 
-function uncompress(dest:pchar;destLen:uLongf; source : pchar; sourceLen:uLong):longint;
+function uncompress(dest:pchar;var destLen:uLongf; source : pchar; sourceLen:uLong):longint;
 begin
 begin
   uncompress:=zuncompr.uncompress(pbytef(dest),destlen,pbytef(source),sourcelen);
   uncompress:=zuncompr.uncompress(pbytef(dest),destlen,pbytef(source),sourcelen);
 end;
 end;