From 53fea053deb466d2347c8f897acfd5df9df902ce Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Thu, 25 Feb 2021 15:29:14 -0800 Subject: [PATCH] fix for fencepost error when looping over vectors --- src/Stmt.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Stmt.cc b/src/Stmt.cc index 11381ed733..95eb9a1035 100644 --- a/src/Stmt.cc +++ b/src/Stmt.cc @@ -1324,7 +1324,7 @@ ValPtr ForStmt::DoExec(Frame* f, Val* v, StmtFlowType& flow) const { VectorVal* vv = v->AsVectorVal(); - for ( auto i = 0u; i <= vv->Size(); ++i ) + for ( auto i = 0u; i < vv->Size(); ++i ) { // Set the loop variable to the current index, and make // another pass over the loop body.