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
Apply suggestions from code review
  • Loading branch information
stephentoub authored Dec 1, 2022
commit 14fdd77c93d189e4f1c28a17103f66e31e72e00a
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,6 @@ ref MemoryMarshal.GetReference(nameSpan),
switch (result)
{
case Interop.Errors.ERROR_SUCCESS:

if (cpt >= names.Length) // possible new item during loop
{
Array.Resize(ref names, names.Length * 2);
Expand All @@ -820,6 +819,7 @@ ref MemoryMarshal.GetReference(nameSpan),
names[cpt++] = new string(nameSpan.Slice(0, nameLength));
nameLength = nameSpan.Length;
break;

default:
// Throw the error
Win32Error(result, null);
Expand Down