summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1584838)
raw | patch | inline | side by side (parent: 1584838)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 10 Feb 2019 13:39:22 +0000 (15:39 +0200) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 10 Feb 2019 13:39:58 +0000 (15:39 +0200) |
src/shared/xparser.pas | patch | blob | history |
diff --git a/src/shared/xparser.pas b/src/shared/xparser.pas
index de2dfb38a379ac52872a91caaffd71ac61a11db2..595d300f99f32291ae9af1da261b3a8907f95106 100644 (file)
--- a/src/shared/xparser.pas
+++ b/src/shared/xparser.pas
mTokInt := 0;
mOptions := aopts;
skipToken();
+ // fuck you, BOM!
+ {
+ if (mBufLen >= 3) and (mBuffer[0] = #$EF) and (mBuffer[1] = #$BB) and (mBuffer[2] = #$BF) then
+ begin
+ for f := 3 to mBufLen-1 do mBuffer[f-3] := mBuffer[f];
+ Dec(mBufLen, 3);
+ end;
+ }
end;
var
level: Integer;
begin
+ //writeln('line=', mLine, '; col=', mCol, '; char0=', Integer(peekChar(0)));
+ if (mLine = 1) and (mCol = 1) and
+ (peekChar(0) = #$EF) and
+ (peekChar(1) = #$BB) and
+ (peekChar(2) = #$BF) then
+ begin
+ skipChar();
+ skipChar();
+ skipChar();
+ end;
+
while (curChar <> #0) do
begin
if (curChar = '/') then