setupapi: Properly null-terminate the path in concat_W().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e8c4dbcec2
commit
db8e2388d9
|
@ -122,6 +122,7 @@ static void concat_W( WCHAR *buffer, const WCHAR *src1, const WCHAR *src2, const
|
||||||
strcpyW( buffer, src1 );
|
strcpyW( buffer, src1 );
|
||||||
buffer += strlenW(buffer );
|
buffer += strlenW(buffer );
|
||||||
if (buffer[-1] != '\\') *buffer++ = '\\';
|
if (buffer[-1] != '\\') *buffer++ = '\\';
|
||||||
|
*buffer = 0;
|
||||||
if (src2) while (*src2 == '\\') src2++;
|
if (src2) while (*src2 == '\\') src2++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,6 +131,7 @@ static void concat_W( WCHAR *buffer, const WCHAR *src1, const WCHAR *src2, const
|
||||||
strcpyW( buffer, src2 );
|
strcpyW( buffer, src2 );
|
||||||
buffer += strlenW(buffer );
|
buffer += strlenW(buffer );
|
||||||
if (buffer[-1] != '\\') *buffer++ = '\\';
|
if (buffer[-1] != '\\') *buffer++ = '\\';
|
||||||
|
*buffer = 0;
|
||||||
if (src3) while (*src3 == '\\') src3++;
|
if (src3) while (*src3 == '\\') src3++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue