From b80ff5ceea98ab0f1517a18f8c7a38e8dab4a280 Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Thu, 3 Mar 2022 21:49:24 -0800 Subject: [PATCH] Fix login for player IDs greater than short.MaxValue due to sign extension --- EOLib/Domain/Login/LoginActions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EOLib/Domain/Login/LoginActions.cs b/EOLib/Domain/Login/LoginActions.cs index f22d6ea09..7c2883a13 100644 --- a/EOLib/Domain/Login/LoginActions.cs +++ b/EOLib/Domain/Login/LoginActions.cs @@ -134,7 +134,7 @@ public async Task RequestCharacterLogin(ICharacter character) public async Task CompleteCharacterLogin() { var packet = new PacketBuilder(PacketFamily.Welcome, PacketAction.Message) - .AddThree(_playerInfoRepository.PlayerID) + .AddThree((ushort)_playerInfoRepository.PlayerID) .AddInt(_characterRepository.MainCharacter.ID) .Build();