From 17e3917e88f5cfb9cc1b537e34da00a2c28a3c46 Mon Sep 17 00:00:00 2001 From: Cuyler36 Date: Thu, 27 Mar 2025 03:30:15 -0400 Subject: [PATCH] Use correct define for item name length --- src/actor/npc/ac_npc_shop_common.c | 8 ++++---- src/actor/npc/event/ac_ev_carpetPeddler.c_inc | 2 +- src/game/m_player_main_get_scoop.c_inc | 2 +- src/game/m_player_main_notice_rod.c_inc | 2 +- src/game/m_player_main_pull_net.c_inc | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/actor/npc/ac_npc_shop_common.c b/src/actor/npc/ac_npc_shop_common.c index 17ee6e3b..b29598ba 100644 --- a/src/actor/npc/ac_npc_shop_common.c +++ b/src/actor/npc/ac_npc_shop_common.c @@ -508,18 +508,18 @@ static void aNSC_set_pw_name_str(NPC_SHOP_COMMON_ACTOR* shop_common) { static void aNSC_set_value_str(int p1, int p2) { u8 value_str[16]; - mFont_UnintToString(value_str, sizeof(value_str), p1, 0x10, TRUE, FALSE, TRUE); - mMsg_Set_free_str(mMsg_Get_base_window_p(), p2, value_str, 0x10); + mFont_UnintToString(value_str, sizeof(value_str), p1, sizeof(value_str), TRUE, FALSE, TRUE); + mMsg_Set_free_str(mMsg_Get_base_window_p(), p2, value_str, sizeof(value_str)); } static void aNSC_set_item_name_str(mActor_name_t itm, u32 p2) { - u8 buff[16]; + u8 buff[mIN_ITEM_NAME_LEN]; u32 art; mMsg_Window_c* msg_win; mIN_copy_name_str(buff, itm); art = mIN_get_item_article(itm); - mMsg_Set_item_str_art(mMsg_Get_base_window_p(), p2, buff, 0x10, art); + mMsg_Set_item_str_art(mMsg_Get_base_window_p(), p2, buff, mIN_ITEM_NAME_LEN, art); } static void aNSC_set_item_str(ACTOR* actorx) { diff --git a/src/actor/npc/event/ac_ev_carpetPeddler.c_inc b/src/actor/npc/event/ac_ev_carpetPeddler.c_inc index 6384abe9..86f44f59 100644 --- a/src/actor/npc/event/ac_ev_carpetPeddler.c_inc +++ b/src/actor/npc/event/ac_ev_carpetPeddler.c_inc @@ -181,7 +181,7 @@ void aECPD_msg_win_open_wait_init(EV_CARPETPEDDLER_ACTOR* peddler, GAME_PLAY* pl void aECPD_1st_check_init(EV_CARPETPEDDLER_ACTOR* peddler, GAME_PLAY* play) { mActor_name_t item; - u8 item_str[8]; + u8 item_str[mIN_ITEM_NAME_LEN]; u8 price_str[6]; mMsg_Window_c* msg_p = mMsg_Get_base_window_p(); int price = eECPD_PRICE_START; diff --git a/src/game/m_player_main_get_scoop.c_inc b/src/game/m_player_main_get_scoop.c_inc index 5781e0dd..dd1f9648 100644 --- a/src/game/m_player_main_get_scoop.c_inc +++ b/src/game/m_player_main_get_scoop.c_inc @@ -161,7 +161,7 @@ static void Player_actor_Get_scoop_demo_ct(ACTOR* actor) { mMsg_Window_c* win = mMsg_Get_base_window_p(); PLAYER_ACTOR* player = (PLAYER_ACTOR*)actor; mPlayer_main_get_scoop_c* main_scoop = &player->main_data.get_scoop; - u8 str[16]; + u8 str[mIN_ITEM_NAME_LEN]; mActor_name_t item = main_scoop->item; mIN_copy_name_str(str, item); diff --git a/src/game/m_player_main_notice_rod.c_inc b/src/game/m_player_main_notice_rod.c_inc index f0a9b2f3..8c7cf95f 100644 --- a/src/game/m_player_main_notice_rod.c_inc +++ b/src/game/m_player_main_notice_rod.c_inc @@ -161,7 +161,7 @@ static void Player_actor_Notice_rod_demo_ct(ACTOR* actor) { if (type < aGYO_TYPE_NUM + 1) { if (player->now_main_index == mPlayer_INDEX_NOTICE_ROD) { mPlayer_main_notice_rod_c* main_notice = &player->main_data.notice_rod; - u8 str[16]; + u8 str[mIN_ITEM_NAME_LEN]; if (main_notice->already_collected) { mIN_copy_name_str(str, uki->get_fish_type_proc(&uki->actor_class)); diff --git a/src/game/m_player_main_pull_net.c_inc b/src/game/m_player_main_pull_net.c_inc index 7390224a..2eac9d8d 100644 --- a/src/game/m_player_main_pull_net.c_inc +++ b/src/game/m_player_main_pull_net.c_inc @@ -126,7 +126,7 @@ static void Player_actor_Pull_net_demo_ct(ACTOR* actor) { msg_no = Common_Get(now_private)->inventory.pockets[item_idx] + 0x1DC; } } else if (main_index == mPlayer_INDEX_PULL_NET) { - u8 str[16]; + u8 str[mIN_ITEM_NAME_LEN]; mActor_name_t item; mPlayer_main_pull_net_c* main_pull = &player->main_data.pull_net;