mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 18:50:37 +02:00
* use local buffer for seek mantis #38930 patch by Hendi.
git-svn-id: trunk@49490 -
This commit is contained in:
parent
134bc7eb42
commit
09290da51e
@ -2554,7 +2554,7 @@ end;
|
||||
procedure TIndexDef.SetDescFields(const AValue: string);
|
||||
begin
|
||||
if FDescFields=AValue then exit;
|
||||
if AValue <> '' then FOptions:=FOptions + [ixDescending];
|
||||
if AValue <> '' then FOptions[A:=FOptions + [ixDescending];
|
||||
FDescFields:=AValue;
|
||||
end;
|
||||
|
||||
|
@ -325,6 +325,7 @@ end;
|
||||
function Tdecompressionstream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
|
||||
|
||||
var c,off: int64;
|
||||
buf: array[0..8191] of Byte;
|
||||
|
||||
begin
|
||||
off:=Offset;
|
||||
@ -344,9 +345,9 @@ begin
|
||||
while off>0 do
|
||||
begin
|
||||
c:=off;
|
||||
if c>bufsize then
|
||||
c:=bufsize;
|
||||
if read(Fbuffer^,c)<>c then
|
||||
if c>SizeOf(buf) then
|
||||
c:=SizeOf(buf);
|
||||
if read(buf,c)<>c then
|
||||
raise Edecompressionerror.create(Sseek_failed);
|
||||
dec(off,c);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user