Commit 6a9f1906 authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

Small fix.

parent 788d8d55
...@@ -198,9 +198,9 @@ WINAPI RtlAnsiStringToUnicodeString( ...@@ -198,9 +198,9 @@ WINAPI RtlAnsiStringToUnicodeString(
uni->Length = len; uni->Length = len;
if (doalloc) if (doalloc)
{ {
uni->MaximumLength = len + sizeof(WCHAR);
uni->Buffer = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,uni->MaximumLength); uni->Buffer = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,uni->MaximumLength);
if (!uni->Buffer) return STATUS_NO_MEMORY; if (!uni->Buffer) return STATUS_NO_MEMORY;
uni->MaximumLength = len + sizeof(WCHAR);
} }
else if (len+sizeof(WCHAR) > uni->MaximumLength) else if (len+sizeof(WCHAR) > uni->MaximumLength)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment