mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Trim newline characters from IP address
This commit is contained in:
parent
55231bb8d3
commit
e36456d3b5
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue