webservices: Don't write a colon for namespace attributes with empty prefix.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2018-01-24 14:29:59 +01:00 committed by Alexandre Julliard
parent a3f80e3ab5
commit 3b6f7148b6
1 changed files with 2 additions and 2 deletions

View File

@ -1482,11 +1482,11 @@ static HRESULT write_namespace_attribute_text( struct writer *writer, const WS_X
/* ' xmlns:prefix="namespace"' */
size = attr->ns->length + 9 /* ' xmlns=""' */;
if (attr->prefix) size += attr->prefix->length + 1 /* ':' */;
if (attr->prefix && attr->prefix->length) size += attr->prefix->length + 1 /* ':' */;
if ((hr = write_grow_buffer( writer, size )) != S_OK) return hr;
write_bytes( writer, (const BYTE *)" xmlns", 6 );
if (attr->prefix)
if (attr->prefix && attr->prefix->length)
{
write_char( writer, ':' );
write_bytes( writer, attr->prefix->bytes, attr->prefix->length );