From d1fc9712b4d2b47102d4076d5ce0f4743152689d Mon Sep 17 00:00:00 2001 From: halx99 Date: Tue, 17 Nov 2020 19:50:58 +0800 Subject: [PATCH] fix UserDefault plain mode stack overflow --- cocos/base/CCUserDefault.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/base/CCUserDefault.cpp b/cocos/base/CCUserDefault.cpp index 69c9a6bfab..be8ba114e0 100644 --- a/cocos/base/CCUserDefault.cpp +++ b/cocos/base/CCUserDefault.cpp @@ -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());