diff --git a/smsdk_config.h b/smsdk_config.h index 2ddc86e..368b0c0 100644 --- a/smsdk_config.h +++ b/smsdk_config.h @@ -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" diff --git a/types/iterator_container.h b/types/iterator_container.h index 55e37ff..23d0966 100644 --- a/types/iterator_container.h +++ b/types/iterator_container.h @@ -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;