From bc93c8603e85b315a664286e8064fceef982d541 Mon Sep 17 00:00:00 2001 From: cracrayol Date: Sat, 10 Apr 2021 13:47:18 +0200 Subject: [PATCH] Tune street: Fix profile name not displayed --- popn@asphyxia/README.md | 2 ++ popn@asphyxia/handler/tunestreet.ts | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/popn@asphyxia/README.md b/popn@asphyxia/README.md index 735fd01..bdbca7c 100644 --- a/popn@asphyxia/README.md +++ b/popn@asphyxia/README.md @@ -11,6 +11,8 @@ Plugin Version: **v2.0.0** - pop'n music Usagi to Neko to Shōnen no Yume - pop'n music peace +Important : require minimum Asphyxia Core **v1.31** + ## Changelog ### 2.0.0 diff --git a/popn@asphyxia/handler/tunestreet.ts b/popn@asphyxia/handler/tunestreet.ts index 5bfdf03..9d17dd9 100644 --- a/popn@asphyxia/handler/tunestreet.ts +++ b/popn@asphyxia/handler/tunestreet.ts @@ -45,9 +45,9 @@ export const getProfile = async (refid: string, name?: string) => { const params = await utils.readParams(refid, version); let binary_profile = Array(2200).fill(0); - let name_binary = profile.name.substr(0, 12); - for (let i = 0; i < name_binary.length; i++) { - binary_profile[i] = name_binary.charAt(i); + let name_binary = U.EncodeString(profile.name, 'shift_jis'); + for (let i = 0; i < name_binary.length || i < 12; i++) { + binary_profile[i] = name_binary[i]; } binary_profile[13] = {