From: Steve Naroff Date: Wed, 7 May 2008 16:50:14 +0000 (+0000) Subject: Fix off-by-one error. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81e72e4c231a47633e36a6c2f3ded83630963b3f;p=clang Fix off-by-one error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50815 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 69dca5af55..cad6065e2e 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -1369,7 +1369,7 @@ Stmt::child_iterator InitListExpr::child_begin() { return reinterpret_cast(&InitExprs[0]); } Stmt::child_iterator InitListExpr::child_end() { - return reinterpret_cast(&InitExprs[getNumInits()]); + return reinterpret_cast(&InitExprs[getNumInits()-1]); } // ObjCStringLiteral