We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbdbdca commit 1ab44ecCopy full SHA for 1ab44ec
Src/UIOUtils.pas
@@ -206,6 +206,8 @@ class function TFileIO.CheckBOM(const Stream: TStream;
206
Assert(Assigned(Stream), 'TFileIO.CheckBOM: Stream is nil');
207
Assert(Assigned(Encoding), 'TFileIO.CheckBOM: Encoding is nil');
208
Preamble := Encoding.GetPreamble;
209
+ if Length(Preamble) = 0 then
210
+ Exit(False);
211
if Stream.Size < Length(Preamble) then
212
Exit(False);
213
OldPos := Stream.Position;
0 commit comments