From b738f331dc866cf5c120c040cdd72869c8a0bf97 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Mon, 9 Nov 2026 01:07:19 +0000 Subject: [PATCH] Decompile fn_04413 (EncodeBase64) Batch #14963 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_04413 EncodeBase64: logic confirmed by peer review Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Utility/Text/Base64.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Utility/Text/Base64.cpp b/Source/Utility/Text/Base64.cpp index 031d50af2..3d8c6ed28 100644 --- a/Source/Utility/Text/Base64.cpp +++ b/Source/Utility/Text/Base64.cpp @@ -87,11 +87,15 @@ std::string Base64Decode(const std::string& encoded, bool removeLinebreaks) { return DecodeBase64(encoded, removeLinebreaks); } +// INLINED +template static std::string Encode(String bytes, bool urlSafe) { + return EncodeBase64(reinterpret_cast(bytes.data()), static_cast(bytes.length()), urlSafe); +} + // OFFSET: 0x00619D70 // FUNCTION: fn_04413 std::string EncodeBase64(const std::string& input, bool urlSafe) { - const std::string bytes(input); - return EncodeBase64(reinterpret_cast(bytes.c_str()), static_cast(bytes.size()), urlSafe); + return Encode(input, urlSafe); } // OFFSET: 0x00619E10