diff --git a/string/hash_vec.cc b/string/hash_vec.cc index f23ab89..836e6d6 100644 --- a/string/hash_vec.cc +++ b/string/hash_vec.cc @@ -73,7 +73,7 @@ struct range_hash { template range_hash(const T& vec) { hp.emplace_back(); - hash_vec hs(vec.size()); + hash_vec hs(vec.size() + 1); for (auto&& x : vec) { hs.push_back(x); hp.emplace_back(hs.hash());