Trim newline characters from IP address (#600)

This commit is contained in:
Cristiandis 2026-03-05 21:27:08 +01:00 committed by GitHub
parent 7147dbad92
commit d3593f1df3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -745,6 +745,8 @@ void CPlatformNetworkManagerStub::SearchForGames()
while (std::fgets(buffer, sizeof(buffer), file)) {
if (phase == 0) {
ip = buffer;
if (!ip.empty() && (ip.back() == '\n' || ip.back() == '\r'))
ip.pop_back();
phase = 1;
}
else if (phase == 1) {