mirror of https://github.com/axmolengine/axmol.git
fix crash cause by std::regex
This commit is contained in:
parent
467bba136a
commit
9bcc66912a
|
@ -946,7 +946,8 @@ bool Node::doEnumerate(std::string name, std::function<bool (Node *)> callback)
|
|||
bool ret = false;
|
||||
for (const auto& child : _children)
|
||||
{
|
||||
if(std::regex_match(child->_name, std::regex(searchName)))
|
||||
// should add ::std::regex_constants::basic for std::regex to avoid crash on Android and windows
|
||||
if(std::regex_match(child->_name, std::regex(searchName, ::std::regex_constants::basic)))
|
||||
{
|
||||
if (!needRecursive)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue