fix UserDefault plain mode stack overflow

This commit is contained in:
HALX99 2020-11-17 19:50:58 +08:00 committed by GitHub
parent 702887ba3c
commit 5ff9f4786e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -418,7 +418,7 @@ void UserDefault::lazyInit()
pugi::xml_parse_result ret = doc.load_file(_filePath.c_str());
if (ret) {
for (auto& elem : doc.document_element())
setValueForKey(elem.name(), elem.text().as_string());
updateValueForKey(elem.name(), elem.text().as_string());
}
else {
log("UserDefault::init load xml file: %s failed, %s", _filePath.c_str(), ret.description());