mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
ULTIMA6: patch nuvie.cfg parsing by extracting text from child
Re-enables nuvie.cfg file parsing that were impacted by XMLNode enhancement, picking the text value of first child if current subtree text is empty. Fixes issue #15207.
This commit is contained in:
parent
85509bd428
commit
2cae1bec12
@ -130,8 +130,12 @@ bool XMLTree::checkRoot(const Common::String &key) const {
|
||||
void XMLTree::value(const Common::String &key, Common::String &ret,
|
||||
const char *defaultvalue) const {
|
||||
const XMLNode *sub = _tree->subtree(key);
|
||||
if (sub)
|
||||
if (sub) {
|
||||
ret = sub->text();
|
||||
if (ret.empty())
|
||||
if (sub->firstChild())
|
||||
ret = sub->firstChild()->text();
|
||||
}
|
||||
else
|
||||
ret = defaultvalue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user