From: Nikolay Sivov nsivov@codeweavers.com
--- dlls/xmllite/tests/writer.c | 3 +++ dlls/xmllite/writer.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c index d3263c6911d..92aa90d3984 100644 --- a/dlls/xmllite/tests/writer.c +++ b/dlls/xmllite/tests/writer.c @@ -1003,6 +1003,9 @@ static void test_WriteStartElement(void) hr = IXmlWriter_WriteStartElement(writer, NULL, NULL, NULL); ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
+ hr = IXmlWriter_WriteStartElement(writer, NULL, L"", NULL); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); + hr = IXmlWriter_WriteProcessingInstruction(writer, L"a", L"a"); ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index 3926f917f9f..c7dcafda875 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -2018,7 +2018,7 @@ static HRESULT WINAPI xmlwriter_WriteStartElement(IXmlWriter *iface, LPCWSTR pre
TRACE("%p, %s, %s, %s.\n", iface, wine_dbgstr_w(prefix), wine_dbgstr_w(local_name), wine_dbgstr_w(uri));
- if (!local_name) + if (is_empty_string(local_name)) return E_INVALIDARG;
switch (writer->state)