From 0bed065ee73c467014d5464a7d9dc2596d6e7dfc Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 16 May 2018 15:52:39 +0200 Subject: [PATCH] Fix source location assertion in isoltest --- test/tools/isoltest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tools/isoltest.cpp b/test/tools/isoltest.cpp index 7a147bd02..100fcbf0e 100644 --- a/test/tools/isoltest.cpp +++ b/test/tools/isoltest.cpp @@ -99,8 +99,8 @@ void SyntaxTestTool::printContract() const for (auto const& error: m_test->errorList()) if (error.locationStart >= 0 && error.locationEnd >= 0) { - assert(static_cast(error.locationStart) < source.length()); - assert(static_cast(error.locationEnd) < source.length()); + assert(static_cast(error.locationStart) <= source.length()); + assert(static_cast(error.locationEnd) <= source.length()); bool isWarning = error.type == "Warning"; for (int i = error.locationStart; i < error.locationEnd; i++) if (isWarning)