From a2eb1fe9be7f186585822ca62d83bdd81f7f8ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Mon, 17 Oct 2022 18:39:42 +0200 Subject: [PATCH] Add assertion --- src/Parsers/TokenIterator.h | 2 ++ 1 file changed, 2 insertions(+) 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]; }