citra-emu
/
citra
Archived
1
0
Fork 0

web_service: avoid undefined behavior assert of std::string::back (#7347)

Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
This commit is contained in:
xperia64 2024-01-12 23:24:01 -05:00 committed by GitHub
parent a177769c3b
commit da9f382d2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ struct Client::Impl {
jwt = jwt_cache.jwt; jwt = jwt_cache.jwt;
} }
// normalize host expression // normalize host expression
if (this->host.back() == '/') { if (!this->host.empty() && this->host.back() == '/') {
static_cast<void>(this->host.pop_back()); static_cast<void>(this->host.pop_back());
} }
} }