Fix reading empty tags from plugin descriptions

If a plugin's description field contained `{{BASH:}}`, LOOT would
extract a Bash Tag with a zero-length name string. This would then cause
the user to be unable to save the metadata editor for that plugin,
because it would recognise that Bash Tag as being invalid.
This commit is contained in:
Oliver Hamlet
2016-06-16 17:24:18 +01:00
parent 1f58addecf
commit ea654d1ea5
+1 -1
View File
@@ -75,7 +75,7 @@ namespace loot {
pos1 += 7;
size_t pos2 = text.find("}}", pos1);
if (pos2 != string::npos) {
if (pos2 != string::npos && pos1 != pos2) {
text = text.substr(pos1, pos2 - pos1);
vector<string> bashTags;