diff --git a/src/api/plugin.cpp b/src/api/plugin.cpp index 13ff7b3a..86c11833 100644 --- a/src/api/plugin.cpp +++ b/src/api/plugin.cpp @@ -266,7 +266,9 @@ Plugin::Plugin(const GameType gameType, } } - tags_ = ExtractBashTags(GetDescription()); + const auto description = GetDescription(); + tags_ = ExtractBashTags(description); + version_ = ExtractVersion(description); } catch (const std::system_error& e) { if (e.code().category() == esplugin_category()) { throw; @@ -318,9 +320,7 @@ std::optional Plugin::GetHeaderVersion() const { return version; } -std::optional Plugin::GetVersion() const { - return ExtractVersion(GetDescription()); -} +std::optional Plugin::GetVersion() const { return version_; } std::vector Plugin::GetMasters() const { if (esPlugin == nullptr) {