Jacek Caban : scrobj: Ignore processing instructions in scriptlet files.
Alexandre Julliard
julliard at winehq.org
Thu Sep 26 15:51:20 CDT 2019
Module: wine
Branch: master
Commit: 142ef8a7e8fd4cb5a7859286deb8a9c4726d8e70
URL: https://source.winehq.org/git/wine.git/?a=commit;h=142ef8a7e8fd4cb5a7859286deb8a9c4726d8e70
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Sep 26 13:57:48 2019 +0200
scrobj: Ignore processing instructions in scriptlet files.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/scrobj/scrobj.c | 14 ++++++++++++--
dlls/scrobj/tests/scrobj.wsc | 4 +++-
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/scrobj/scrobj.c b/dlls/scrobj/scrobj.c
index 8aa1eeb793..ce5a3dedd1 100644
--- a/dlls/scrobj/scrobj.c
+++ b/dlls/scrobj/scrobj.c
@@ -1261,8 +1261,18 @@ static const char *debugstr_xml_name(struct scriptlet_factory *factory)
static HRESULT next_xml_node(struct scriptlet_factory *factory, XmlNodeType *node_type)
{
HRESULT hres;
- do hres = IXmlReader_Read(factory->xml_reader, node_type);
- while (hres == S_OK && *node_type == XmlNodeType_Whitespace);
+ for (;;)
+ {
+ hres = IXmlReader_Read(factory->xml_reader, node_type);
+ if (FAILED(hres)) break;
+ if (*node_type == XmlNodeType_Whitespace) continue;
+ if (*node_type == XmlNodeType_ProcessingInstruction)
+ {
+ FIXME("Ignoring processing instruction\n");
+ continue;
+ }
+ break;
+ }
return hres;
}
diff --git a/dlls/scrobj/tests/scrobj.wsc b/dlls/scrobj/tests/scrobj.wsc
index 4cc4224dd7..fe32901138 100644
--- a/dlls/scrobj/tests/scrobj.wsc
+++ b/dlls/scrobj/tests/scrobj.wsc
@@ -4,7 +4,9 @@
</registration>
<public>
<method name="vbAddOne">
- <PARAMETER name="n"></PARAMETER>
+ <PARAMETER name="n">
+ <?pi xxx="yyy"?>
+ </PARAMETER>
</method>
<method name="jsAddTwo" />
<method name="wtTest">
More information about the wine-cvs
mailing list