Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Parser/tokenizer/helpers.c
Co-authored-by: AN Long <[email protected]>
  • Loading branch information
AdamKorcz and aisk authored Feb 16, 2026
commit 9edd6f8868e836460ab76e2417e2418286ee1b48
6 changes: 4 additions & 2 deletions Parser/tokenizer/helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,11 @@ valid_utf8(const unsigned char* s)
return 0;
}
length = expected + 1;
for (int i = 1; i <= expected; i++)
if (s[i] < 0x80 || s[i] >= 0xC0)
for (int i = 1; i <= expected; i++) {
if (s[i] < 0x80 || s[i] >= 0xC0) {
return 0;
}
}
return length;
}

Expand Down
Loading