diff --git a/dll/steam_ugc.cpp b/dll/steam_ugc.cpp index 0f45df63..66ce3274 100644 --- a/dll/steam_ugc.cpp +++ b/dll/steam_ugc.cpp @@ -381,7 +381,7 @@ std::optional Steam_UGC::get_query_ugc_tag(UGCQueryHandle_t handle, if (indexTag >= res.size()) return std::nullopt; std::string tmp = res[indexTag]; - if (tmp.back() == ',') { + if (!tmp.empty() && tmp.back() == ',') { tmp = tmp.substr(0, tmp.size() - 1); } return tmp;