mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-15 16:29:14 +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);
|
procedure TIndexDef.SetDescFields(const AValue: string);
|
||||||
begin
|
begin
|
||||||
if FDescFields=AValue then exit;
|
if FDescFields=AValue then exit;
|
||||||
if AValue <> '' then FOptions:=FOptions + [ixDescending];
|
if AValue <> '' then FOptions[A:=FOptions + [ixDescending];
|
||||||
FDescFields:=AValue;
|
FDescFields:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -325,6 +325,7 @@ end;
|
|||||||
function Tdecompressionstream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
|
function Tdecompressionstream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
|
||||||
|
|
||||||
var c,off: int64;
|
var c,off: int64;
|
||||||
|
buf: array[0..8191] of Byte;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
off:=Offset;
|
off:=Offset;
|
||||||
@ -344,9 +345,9 @@ begin
|
|||||||
while off>0 do
|
while off>0 do
|
||||||
begin
|
begin
|
||||||
c:=off;
|
c:=off;
|
||||||
if c>bufsize then
|
if c>SizeOf(buf) then
|
||||||
c:=bufsize;
|
c:=SizeOf(buf);
|
||||||
if read(Fbuffer^,c)<>c then
|
if read(buf,c)<>c then
|
||||||
raise Edecompressionerror.create(Sseek_failed);
|
raise Edecompressionerror.create(Sseek_failed);
|
||||||
dec(off,c);
|
dec(off,c);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user