Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take into account the provided format in Utf8Parser.TryParse for bool #100676

Closed
wants to merge 3 commits into from
Closed
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
Remove trailing spaces
joegoldman2 committed Apr 5, 2024
commit 01d574af5da0629d723b5c375a292c057b9a5d9a
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ public static bool TryParse(ReadOnlySpan<byte> source, out bool value, out int b
value = true;
return true;
}

if (source.Length > 4)
{
if (dw == 0x736C6146 /* 'slaF' */ && source[4] == 'e')
@@ -61,7 +61,7 @@ public static bool TryParse(ReadOnlySpan<byte> source, out bool value, out int b
value = true;
return true;
}

if (source.Length > 4)
{
if (dw == 0x736C6166 /* 'slaf' */ && source[4] == 'e')