reset loader pos if no BOM found

This commit is contained in:
Basile Burg 2015-09-22 13:17:32 +02:00
parent 92ba1bcdfa
commit d8cde2ecf2
1 changed files with 3 additions and 1 deletions

View File

@ -171,7 +171,9 @@ begin
else if (bom and $FEFF) = $FEFF then else if (bom and $FEFF) = $FEFF then
loader.Position:= 2 loader.Position:= 2
else if (bom and $FFFE) = $FFFE then else if (bom and $FFFE) = $FFFE then
loader.Position:= 2; loader.Position:= 2
else
loader.Position:= 0;
// //
fJSON.Free; fJSON.Free;
parser := TJSONParser.Create(loader, false); parser := TJSONParser.Create(loader, false);