Author: pschweitzer
Date: Sun Sep 20 14:04:48 2015
New Revision: 69305
URL:
http://svn.reactos.org/svn/reactos?rev=69305&view=rev
Log:
[NTDLL_APITESTS]
Properly init string length
Modified:
trunk/rostests/apitests/ntdll/RtlGenerate8dot3Name.c
Modified: trunk/rostests/apitests/ntdll/RtlGenerate8dot3Name.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/RtlGenerat…
==============================================================================
--- trunk/rostests/apitests/ntdll/RtlGenerate8dot3Name.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/RtlGenerate8dot3Name.c [iso-8859-1] Sun Sep 20 14:04:48
2015
@@ -36,13 +36,14 @@
RtlZeroMemory(&Context, sizeof(GENERATE_NAME_CONTEXT));
RtlInitUnicodeString(&LongName, Names[i]);
ShortName.Buffer = Buffer;
- ShortName.Length = sizeof(Buffer);
+ ShortName.Length = 0;
ShortName.MaximumLength = sizeof(Buffer);
RtlGenerate8dot3Name(&LongName, FALSE, &Context, &ShortName);
RtlInitUnicodeString(&Expected, ShortNames1[i]);
ok(RtlEqualUnicodeString(&Expected, &ShortName, FALSE), "Generated:
%.*S. Expected: %.*S\n", ShortName.Length, ShortName.Buffer, Expected.Length,
Expected.Buffer);
+ ShortName.Length = 0;
RtlGenerate8dot3Name(&LongName, FALSE, &Context, &ShortName);
RtlInitUnicodeString(&Expected, ShortNames2[i]);
ok(RtlEqualUnicodeString(&Expected, &ShortName, FALSE), "Generated:
%.*S. Expected: %.*S\n", ShortName.Length, ShortName.Buffer, Expected.Length,
Expected.Buffer);