|
@@ -255,6 +255,7 @@ type
|
|
private
|
|
private
|
|
FFile: ^Text;
|
|
FFile: ^Text;
|
|
FString: string;
|
|
FString: string;
|
|
|
|
+ FTmp: string;
|
|
public
|
|
public
|
|
constructor Create(var AFile: Text);
|
|
constructor Create(var AFile: Text);
|
|
procedure FetchData; override;
|
|
procedure FetchData; override;
|
|
@@ -1148,11 +1149,18 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TXMLFileInputSource.FetchData;
|
|
procedure TXMLFileInputSource.FetchData;
|
|
|
|
+var
|
|
|
|
+ Remainder: Integer;
|
|
begin
|
|
begin
|
|
if not Eof(FFile^) then
|
|
if not Eof(FFile^) then
|
|
begin
|
|
begin
|
|
|
|
+ Remainder := FCharBufEnd - FCharBuf;
|
|
|
|
+ if Remainder > 0 then
|
|
|
|
+ SetString(FTmp, FCharBuf, Remainder);
|
|
ReadLn(FFile^, FString);
|
|
ReadLn(FFile^, FString);
|
|
FString := FString + #10; // bad solution...
|
|
FString := FString + #10; // bad solution...
|
|
|
|
+ if Remainder > 0 then
|
|
|
|
+ Insert(FTmp, FString, 1);
|
|
FCharBuf := PChar(FString);
|
|
FCharBuf := PChar(FString);
|
|
FCharBufEnd := FCharBuf + Length(FString);
|
|
FCharBufEnd := FCharBuf + Length(FString);
|
|
end;
|
|
end;
|