for (unsigned i = 0; i < kind::LAST_KIND; ++ i) {
d_exprStatistics[i] = NULL;
}
- for (unsigned i = 0; i < LAST_TYPE; ++ i) {
+ for (unsigned i = 0; i <= LAST_TYPE; ++ i) {
d_exprStatisticsVars[i] = NULL;
}
#endif
ExprManager::ExprManager(const Options& options) :
d_nodeManager(new NodeManager(this, options)) {
#ifdef CVC4_STATISTICS_ON
- for (unsigned i = 0; i < LAST_TYPE; ++ i) {
+ for (unsigned i = 0; i <= LAST_TYPE; ++ i) {
d_exprStatisticsVars[i] = NULL;
}
for (unsigned i = 0; i < kind::LAST_KIND; ++ i) {
d_exprStatistics[i] = NULL;
}
}
- for (unsigned i = 0; i < LAST_TYPE; ++ i) {
+ for (unsigned i = 0; i <= LAST_TYPE; ++ i) {
if (d_exprStatisticsVars[i] != NULL) {
d_nodeManager->getStatisticsRegistry()->unregisterStat(d_exprStatisticsVars[i]);
delete d_exprStatisticsVars[i];
NodeManager* d_nodeManager;
/** Counts of expressions and variables created of a given kind */
- IntStat* d_exprStatisticsVars[LAST_TYPE];
+ IntStat* d_exprStatisticsVars[LAST_TYPE + 1];
IntStat* d_exprStatistics[kind::LAST_KIND];
/**