mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-01-08 16:54:14 +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;
|
if (indexTag >= res.size()) return std::nullopt;
|
||||||
|
|
||||||
std::string tmp = res[indexTag];
|
std::string tmp = res[indexTag];
|
||||||
if (tmp.back() == ',') {
|
if (!tmp.empty() && tmp.back() == ',') {
|
||||||
tmp = tmp.substr(0, tmp.size() - 1);
|
tmp = tmp.substr(0, tmp.size() - 1);
|
||||||
}
|
}
|
||||||
return tmp;
|
return tmp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user