xmllite: Make another read attempt if we don't have enough data initially.

This commit is contained in:
Nikolay Sivov 2013-03-11 08:45:53 +04:00 committed by Alexandre Julliard
parent 9377514583
commit 88d7b66be2
1 changed files with 6 additions and 1 deletions

View File

@ -610,7 +610,12 @@ static HRESULT readerinput_detectencoding(xmlreaderinput *readerinput, xml_encod
*enc = XmlEncoding_Unknown;
if (buffer->written <= 3) return MX_E_INPUTEND;
if (buffer->written <= 3)
{
HRESULT hr = readerinput_growraw(readerinput);
if (FAILED(hr)) return hr;
if (buffer->written <= 3) return MX_E_INPUTEND;
}
/* try start symbols if we have enough data to do that, input buffer should contain
first chunk already */