Skip to content

Commit

Permalink
Fixes an issue with subtitles detect utf8
Browse files Browse the repository at this point in the history
Former-commit-id: 4fd53c4
  • Loading branch information
SuRGeoNix committed May 4, 2021
1 parent e0b1ee5 commit 30c1dac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FlyleafLib/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public static bool IsUtf8(byte[] buffer, int length)
{
int position = 0;
int bytes = 0;
while (position < length)
while (position < length - 4)
{
if (!IsValid(buffer, position, length, ref bytes))
{
Expand Down

0 comments on commit 30c1dac

Please sign in to comment.