From 1eecfa350a1773798474cccb466f6ab06b3a3c53 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Fri, 22 Mar 2024 23:45:35 -0500 Subject: [PATCH] Updated username --- source/CPacketReceive.cpp | 4 ++-- source/Changelog.txt | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source/CPacketReceive.cpp b/source/CPacketReceive.cpp index 1383cf14..7b185ee9 100644 --- a/source/CPacketReceive.cpp +++ b/source/CPacketReceive.cpp @@ -397,7 +397,7 @@ void CPIFirstLogin::Receive( void ) char temp[30]; // Grab our username memcpy( temp, &tSock->Buffer()[1], 30 ); - userId = temp; + userId = oldstrutil::trim( temp ); // Grab our password memcpy( temp, &tSock->Buffer()[31], 30 ); @@ -547,7 +547,7 @@ void CPISecondLogin::Receive( void ) // Grab our username memcpy( temp, &tSock->Buffer()[5], 30 ); - sid = temp; + sid = oldstrutil::trim( temp ); // Grab our password memcpy( temp, &tSock->Buffer()[35], 30 ); diff --git a/source/Changelog.txt b/source/Changelog.txt index ad7a3d7a..ec710f5d 100644 --- a/source/Changelog.txt +++ b/source/Changelog.txt @@ -1,3 +1,6 @@ +22/03/2024 - Dragon Slayer/Xuri + Leading/trailing whitespace is now trimmed from account names during login. + 21/03/2024 - Dragon Slayer/Xuri Fixed an issue with onHunger and onThirst event crashing if the npc was not loaded yet.