From 00339ee4fd78427ea204c2d48c1e67ab7cf90956 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 30 Jul 2018 21:01:07 -0500 Subject: [PATCH] [ox/fs] Fix PathIterator::valid to check iterator against max size --- deps/ox/src/ox/fs/filesystem/pathiterator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/ox/src/ox/fs/filesystem/pathiterator.cpp b/deps/ox/src/ox/fs/filesystem/pathiterator.cpp index 24020cfb..e3694d02 100644 --- a/deps/ox/src/ox/fs/filesystem/pathiterator.cpp +++ b/deps/ox/src/ox/fs/filesystem/pathiterator.cpp @@ -178,7 +178,7 @@ bool PathIterator::hasNext() const { } bool PathIterator::valid() const { - return m_path[m_iterator] != 0; + return m_iterator < m_maxSize && m_path[m_iterator] != 0; } PathIterator PathIterator::operator+(int i) const {