diff options
| author | Cristiandis <112336919+Cristiandis@users.noreply.github.com> | 2026-03-05 21:27:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-05 14:27:08 -0600 |
| commit | d3593f1df39a7ea66d35f2b3d92c230e32b0869f (patch) | |
| tree | 897a50c99c2a79d8d323755e788e696d3fa27c3e /Minecraft.Client/Common/Network | |
| parent | 7147dbad925dd2d812b8a827fc28d233904f6794 (diff) | |
Trim newline characters from IP address (#600)
Diffstat (limited to 'Minecraft.Client/Common/Network')
| -rw-r--r-- | Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp index 6dd465d1..85531e47 100644 --- a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp +++ b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp @@ -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) { |
