fix crash cause by std::regex

This commit is contained in:
minggo 2014-06-30 20:45:01 +08:00
parent 467bba136a
commit 9bcc66912a
1 changed files with 2 additions and 1 deletions

View File

@ -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)
{