Skip to content

Commit ccae4af

Browse files
committed
Fix off-by-one error
1 parent 50c1f46 commit ccae4af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DbStructureModel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ static long calc_number_of_objects_by_type(const objectMap& objmap, const std::s
308308
if(objects.first == objmap.end())
309309
return 0;
310310
else
311-
return std::distance(objects.first, objects.second) + 1;
311+
return std::distance(objects.first, objects.second);
312312
}
313313

314314
void DbStructureModel::buildTree(QTreeWidgetItem* parent, const std::string& schema)

0 commit comments

Comments
 (0)