Skip to content

Commit 6e71c2e

Browse files
committed
Fix PhCopyStringZFromBytes regression from commit 35fda0b
1 parent 619ee0f commit 6e71c2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

phlib/basesup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ BOOLEAN PhCopyStringZFromBytes(
877877

878878
// Copy the string if there is enough room.
879879

880-
if (OutputBuffer && OutputCount >= i + sizeof(UNICODE_NULL)) // need one character for null terminator
880+
if (OutputBuffer && OutputCount >= i + sizeof(ANSI_NULL)) // need one character for null terminator
881881
{
882882
PhZeroExtendToUtf16Buffer(InputBuffer, i, OutputBuffer);
883883
OutputBuffer[i] = UNICODE_NULL;
@@ -889,7 +889,7 @@ BOOLEAN PhCopyStringZFromBytes(
889889
}
890890

891891
if (ReturnCount)
892-
*ReturnCount = i + sizeof(UNICODE_NULL);
892+
*ReturnCount = i + sizeof(ANSI_NULL);
893893

894894
return copied;
895895
}

0 commit comments

Comments
 (0)