mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-01-07 16:24:15 +08:00
check tag string size before access
This commit is contained in:
parent
d8e94a373a
commit
e93dfc22b1
@ -381,7 +381,7 @@ std::optional<std::string> 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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user