Skip to content

Commit

Permalink
fix wrong assertion
Browse files Browse the repository at this point in the history
index == items_.size() also means insert at end.
  • Loading branch information
gfgtdf committed Aug 16, 2017
1 parent 5081859 commit 4420755
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/widgets/generator_private.hpp
Expand Up @@ -748,7 +748,7 @@ class generator : public minimum_selection,
const std::function<void(widget&)>& callback) override
{
assert(list_builder);
assert(index == -1 || static_cast<unsigned>(index) < items_.size());
assert(index == -1 || static_cast<unsigned>(index) <= items_.size());

child* item = new child;
list_builder->build(&item->child_grid);
Expand Down

0 comments on commit 4420755

Please sign in to comment.