diff --git a/util/status.cc b/util/status.cc index ace4f1411..c9fa2659b 100644 --- a/util/status.cc +++ b/util/status.cc @@ -134,7 +134,7 @@ std::string Status::ToString() const { std::string result(type); if (subcode_ != kNone) { uint32_t index = static_cast(subcode_); - assert(sizeof(msgs) > index); + assert(sizeof(msgs) / sizeof(msgs[0]) > index); result.append(msgs[index]); }