From 7f9d1d843e861c1e83650a1ddab5eb4fd4a39622 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Thu, 21 Nov 2024 17:41:24 -0500 Subject: [PATCH] Small Fix --- mods/src/skin/skin.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mods/src/skin/skin.cpp b/mods/src/skin/skin.cpp index 2fc8c259c5..1d604a72c3 100644 --- a/mods/src/skin/skin.cpp +++ b/mods/src/skin/skin.cpp @@ -47,9 +47,9 @@ static std::string base64_encode(const std::string &data) { } // Change Texture For Player Entities -static void Player_username_assign_injection(std::string *target, std::string *username) { +static void Player_username_assign_injection(std::string *target, const std::string &username) { // Call Original Method - *target = *username; + *target = username; // Get Player Player *player = (Player *) (((unsigned char *) target) - offsetof(Player, username)); @@ -57,11 +57,11 @@ static void Player_username_assign_injection(std::string *target, std::string *u std::string *texture = &player->texture; // Set Texture - *texture = '$' + base64_encode(*username); + *texture = '$' + base64_encode(username); } static void Player_username_assign_injection_2(std::string *target, const char *username) { - std::string username_str = username; - Player_username_assign_injection(target, &username_str); + const std::string username_str = username; + Player_username_assign_injection(target, username_str); } // Change Texture For HUD