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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
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
try fix target buffer size error
  • Loading branch information
hrrrrustic committed Sep 24, 2023
commit f532064a915d510dd4e618d47f0b00bc5c1e1d38
2 changes: 1 addition & 1 deletion src/libraries/Common/src/System/HexConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public static bool TryDecodeFromUtf16(ReadOnlySpan<char> chars, Span<byte> bytes
int j = 0;
int byteLo = 0;
int byteHi = 0;
while (j < chars.Length / 2)
while (j < bytes.Length)
{
byteLo = FromChar(chars[i + 1]);
byteHi = FromChar(chars[i]);
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/Convert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3023,6 +3023,7 @@ public static OperationStatus FromHexString(ReadOnlySpan<char> source, Span<byte
else if (remainder == 1)
{
source = source.Slice(0, source.Length - 1);
destination = destination.Slice(0, destination.Length - 1);
successResult = OperationStatus.NeedMoreData;
}

Expand Down