mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 13:43:50 +00:00
webservices: Add support for RECORD_BYTES32_TEXT in write_text_bin().
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
375854cafe
commit
7b3550fbae
|
@ -2766,6 +2766,26 @@ static HRESULT write_text_bin( struct writer *writer, const WS_XML_TEXT *text, U
|
|||
}
|
||||
return S_OK;
|
||||
}
|
||||
case RECORD_BYTES32_TEXT:
|
||||
{
|
||||
const WS_XML_BASE64_TEXT *text_base64 = (const WS_XML_BASE64_TEXT *)text;
|
||||
UINT32 rem = text_base64->length % 3, len = text_base64->length - rem;
|
||||
if (len)
|
||||
{
|
||||
if ((hr = write_grow_buffer( writer, 1 + sizeof(len) + len )) != S_OK) return hr;
|
||||
write_char( writer, rem ? RECORD_BYTES32_TEXT : RECORD_BYTES32_TEXT_WITH_ENDELEMENT );
|
||||
write_bytes( writer, (const BYTE *)&len, sizeof(len) );
|
||||
write_bytes( writer, text_base64->bytes, len );
|
||||
}
|
||||
if (rem)
|
||||
{
|
||||
if ((hr = write_grow_buffer( writer, 3 )) != S_OK) return hr;
|
||||
write_char( writer, RECORD_BYTES8_TEXT_WITH_ENDELEMENT );
|
||||
write_char( writer, rem );
|
||||
write_bytes( writer, (const BYTE *)text_base64->bytes + len, rem );
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
case RECORD_ZERO_TEXT_WITH_ENDELEMENT:
|
||||
case RECORD_ONE_TEXT_WITH_ENDELEMENT:
|
||||
case RECORD_FALSE_TEXT_WITH_ENDELEMENT:
|
||||
|
|
Loading…
Reference in a new issue