mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user