mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Fix #90: expand_keyword crashed when string ended with tags because of iterator out of bounds.
This commit is contained in:
@@ -4,6 +4,9 @@ Magic Set Editor changelog, for the details see `git log`
|
|||||||
HEAD: new items added as changes are made
|
HEAD: new items added as changes are made
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
* Fixed: crash in expand_keywords when given empty tags (#90)
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
version 2.1.1, 2020-06-14
|
version 2.1.1, 2020-06-14
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -542,6 +542,7 @@ String expand_keywords(const String& tagged_str, vector<KeywordMatch> const& mat
|
|||||||
// No match, so there is at least one character not part of a keyword
|
// No match, so there is at least one character not part of a keyword
|
||||||
// and possibly some tags before it that we missed
|
// and possibly some tags before it that we missed
|
||||||
skip_tags_for_keyword(true, true);
|
skip_tags_for_keyword(true, true);
|
||||||
|
if (it == end) break;
|
||||||
out += *it;
|
out += *it;
|
||||||
++it;
|
++it;
|
||||||
++untagged_pos;
|
++untagged_pos;
|
||||||
|
|||||||
Reference in New Issue
Block a user