Commit cda44f08 authored by Frederick Zhang's avatar Frederick Zhang

fix bstr bint search

parent 3247b46b
......@@ -61,7 +61,7 @@ zval * bint::search(const std::string &needle, const long &mode, const std::stri
zval *zv = new zval();
array_init(zv);
if (mode == 0 && bitem::is_ll(needle) && _value == std::stoll(needle))
if (mode == 1 && bitem::is_ll(needle) && _value == std::stoll(needle))
add_next_index_stringl(zv, path.c_str(), path.length());
return zv;
......
......@@ -65,7 +65,7 @@ zval * bstr::search(const std::string &needle, const long &mode, const std::stri
zval *zv = new zval();
array_init(zv);
if (mode == 0 && _value.find(needle) != std::string::npos)
if (mode == 1 && _value.find(needle) != std::string::npos)
add_next_index_stringl(zv, path.c_str(), path.length());
return zv;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment