]> granicus.if.org Git - clang/commitdiff
Fix off-by-one error.
authorSteve Naroff <snaroff@apple.com>
Wed, 7 May 2008 16:50:14 +0000 (16:50 +0000)
committerSteve Naroff <snaroff@apple.com>
Wed, 7 May 2008 16:50:14 +0000 (16:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50815 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Expr.cpp

index 69dca5af5587e7a32723d0d825766acfde419384..cad6065e2e5dbc775b246286950d6e2fa1f9aafd 100644 (file)
@@ -1369,7 +1369,7 @@ Stmt::child_iterator InitListExpr::child_begin() {
   return reinterpret_cast<Stmt**>(&InitExprs[0]);
 }
 Stmt::child_iterator InitListExpr::child_end() {
-  return reinterpret_cast<Stmt**>(&InitExprs[getNumInits()]);
+  return reinterpret_cast<Stmt**>(&InitExprs[getNumInits()-1]);
 }
 
 // ObjCStringLiteral