Skip to content

Commit

Permalink
Prevent hard freeze calling Next on empty map
Browse files Browse the repository at this point in the history
  • Loading branch information
nosoop committed Nov 15, 2018
1 parent 4a5bbeb commit 9c09d29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion smsdk_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/* Basic information exposed publicly */
#define SMEXT_CONF_NAME "More ADTs"
#define SMEXT_CONF_DESCRIPTION "Provides additional data structures to SourceMod."
#define SMEXT_CONF_VERSION "0.1.8"
#define SMEXT_CONF_VERSION "0.1.9"
#define SMEXT_CONF_AUTHOR "nosoop"
#define SMEXT_CONF_URL "http://github.com/nosoop/SMExt-MoreADTs"
#define SMEXT_CONF_LOGTAG "mADT"
Expand Down
4 changes: 2 additions & 2 deletions types/iterator_container.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class IteratorContainer {
_struct(source), _it(begin), _end(end), _current_removed(false) {};

bool Next() {
if (_current != _end) {
// _current is assigned before _it advances
// no point advancing the iterator if it's at the end
if (_it != _end && _current != _end) {
_current = _it++;
_current_removed = false;

Expand Down

0 comments on commit 9c09d29

Please sign in to comment.