Commit cda44f08 authored by Frederick Zhang's avatar Frederick Zhang
Browse files

fix bstr bint search

parent 3247b46b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;