mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-08 22:07:48 +02:00
* Fix never-ending loop when setting filter
This commit is contained in:
parent
980c23aa15
commit
816d7bd3e1
@ -1333,7 +1333,7 @@ begin
|
||||
else
|
||||
Result := grBOF; // begin of file
|
||||
gmCurrent: // check if empty
|
||||
if fCurrent >= fCurrentIndex.Count then
|
||||
if (FCurrent<0) or (fCurrent >= fCurrentIndex.Count) then
|
||||
Result := grEOF;
|
||||
end;
|
||||
if Result = grOK then // read the data
|
||||
@ -1347,6 +1347,12 @@ begin
|
||||
begin
|
||||
FFilterRow:=Buffer.Data;
|
||||
recordAccepted:=DoFilterRecord;
|
||||
if Not RecordAccepted and (GetMode=gmCurrent) then
|
||||
begin
|
||||
// Transform to EOF.
|
||||
RecordAccepted:=True;
|
||||
Result:=grEOF;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
until recordAccepted;
|
||||
|
Loading…
Reference in New Issue
Block a user