mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 14:49:10 +02:00
* Make sure BOM marker is correctly compared
This commit is contained in:
parent
266a0af993
commit
628d035b50
@ -127,6 +127,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TParser.SkipBOM;
|
procedure TParser.SkipBOM;
|
||||||
|
const
|
||||||
|
sbom : string[3] = #$EF#$BB#$BF;
|
||||||
var
|
var
|
||||||
i : integer;
|
i : integer;
|
||||||
bom : string[3];
|
bom : string[3];
|
||||||
@ -142,7 +144,7 @@ begin
|
|||||||
CheckLoadBuffer;
|
CheckLoadBuffer;
|
||||||
inc(i);
|
inc(i);
|
||||||
end;
|
end;
|
||||||
if (bom<>(#$EF+#$BB+#$BF)) then
|
if (bom<>sBom) then
|
||||||
fPos:=backup;
|
fPos:=backup;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user