diff --git a/src/Parsers/TokenIterator.h b/src/Parsers/TokenIterator.h index 566b376eb8d..c9ac61dfef9 100644 --- a/src/Parsers/TokenIterator.h +++ b/src/Parsers/TokenIterator.h @@ -3,6 +3,7 @@ #include #include +#include #include @@ -27,6 +28,7 @@ public: ALWAYS_INLINE inline const Token & operator[](size_t index) { + assert(index < data.size()); last_accessed_index = std::max(last_accessed_index, index); return data[index]; }