From 31fdbe5b515ea8bb8a3f46cb6e72f67771c28794 Mon Sep 17 00:00:00 2001 From: Kyle Benne Date: Thu, 4 Dec 2014 08:33:36 -0600 Subject: [PATCH] Fix array bound for sql lastDayOfMonth [#1306026] --- src/EnergyPlus/SQLiteProcedures.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnergyPlus/SQLiteProcedures.cc b/src/EnergyPlus/SQLiteProcedures.cc index 3593a5119bc..9946dbb73bf 100644 --- a/src/EnergyPlus/SQLiteProcedures.cc +++ b/src/EnergyPlus/SQLiteProcedures.cc @@ -1539,7 +1539,7 @@ void SQLite::createSQLiteTimeIndexRecord( intervalInMinutes = 60*24*lastDayOfMonth[month() - 1]; sqliteBindInteger(m_timeIndexInsertStmt, 1, m_sqlDBTimeIndex); sqliteBindInteger(m_timeIndexInsertStmt, 2, month()); - sqliteBindInteger(m_timeIndexInsertStmt, 3, lastDayOfMonth[month()]); + sqliteBindInteger(m_timeIndexInsertStmt, 3, lastDayOfMonth[month() - 1]); sqliteBindInteger(m_timeIndexInsertStmt, 4, 24); sqliteBindInteger(m_timeIndexInsertStmt, 5, 0); sqliteBindNULL(m_timeIndexInsertStmt, 6);