From 9424885c8e8d78230aa8de1c9083b3493a615222 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Thu, 13 Feb 2025 13:21:58 +0100 Subject: Fixed handling of update URLs which mention a port This appears to have been a regression in f405849b49614254f42eb3ee6147434458978623, which for some reason erased the port (and any trailing parts) from not just the update directory but also from the update URL. Unfortunately we can't access Mana-Mantis #381 at the moment, but presumably the port was removed due to the colon being a problematic character. Instead, now the colon (and other special characters) are replaced by _ when determining the update directory. Closes https://git.themanaworld.org/mana/mana/-/issues/80 --- src/net/tmwa/loginhandler.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/net') diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp index 24bc9ab2..069f9336 100644 --- a/src/net/tmwa/loginhandler.cpp +++ b/src/net/tmwa/loginhandler.cpp @@ -103,17 +103,15 @@ void LoginHandler::handleMessage(MessageIn &msg) } break; - case SMSG_UPDATE_HOST: - int len; - - len = msg.readInt16() - 4; + case SMSG_UPDATE_HOST: { + int len = msg.readInt16() - 4; mUpdateHost = msg.readString(len); loginData.updateHost = mUpdateHost; logger->log("Received update host \"%s\" from login server.", mUpdateHost.c_str()); break; - + } case SMSG_LOGIN_DATA: // Skip the length word msg.skip(2); -- cgit v1.2.3-70-g09d2