diff --git a/lib/structs/responses/version.cpp b/lib/structs/responses/version.cpp index e6467c70961bb3dbb3aecd3e73a8d15189cae9a7..dca0c34534811f25ed1813e9cc4809e03cac981e 100644 --- a/lib/structs/responses/version.cpp +++ b/lib/structs/responses/version.cpp @@ -4,8 +4,6 @@ #include <nlohmann/json.hpp> -const static std::regex VERSION_REGEX(R"(r(\d+)\.(\d+)\.(\d+))"); - namespace mtx { namespace responses { @@ -15,7 +13,7 @@ from_json(const nlohmann::json &obj, Versions &response) response.versions = obj.at("versions").get<std::vector<std::string>>(); for (auto &version : response.versions) { - if (!std::regex_match(version, VERSION_REGEX)) + if (version.empty()) throw std::invalid_argument(version + ": invalid version"); } }