Skip to content

Commit

Permalink
use profile before moving
Browse files Browse the repository at this point in the history
  • Loading branch information
Alvsch committed Oct 20, 2024
1 parent 6559b49 commit e9833a7
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions pumpkin/src/client/client_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ impl Client {
}
}
} else {
*gameprofile = Some(GameProfile {
let profile = GameProfile {
id: login_start.uuid,
name: login_start.name,
properties: vec![],
profile_actions: None,
});
};

if BASIC_CONFIG.encryption {
let verify_token: [u8; 4] = rand::random();
Expand All @@ -116,13 +116,10 @@ impl Client {
if ADVANCED_CONFIG.packet_compression.enabled {
self.enable_compression().await;
}
self.finish_login(
gameprofile
.as_ref()
.expect("The GameProfile was just set to Some, this should never fail"),
)
.await;
self.finish_login(&profile).await;
}

*gameprofile = Some(profile);
}
}

Expand Down

0 comments on commit e9833a7

Please sign in to comment.