From 8acbf9e275343b58af19f52bf81f1e2521688a73 Mon Sep 17 00:00:00 2001 From: AZero13 <83477269+SiliconA-Z@users.noreply.github.com> Date: Sun, 22 Mar 2026 17:12:24 -0400 Subject: [PATCH] UBFix: target_p is uninitialized Credit to Nintendo for putting this fix in the switch frlg version, which means there's a good change if emerald also gets this treatment, it will be there too, and for Rairii for finding the code change. I looked into the purpose of the change and it turns out CpuCopy16 copies the value into gRfuLinkStatus->partner[slot], which means it should be initialized. --- src/librfu_rfu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/librfu_rfu.c b/src/librfu_rfu.c index ee5dbe6af4..9228d4b520 100644 --- a/src/librfu_rfu.c +++ b/src/librfu_rfu.c @@ -764,7 +764,11 @@ static void rfu_CB_pollConnectParent(u8 reqCommand, u16 reqResult) u16 id; u8 slot; u8 bm_slot_flag, i; +#ifdef UBFIX + struct RfuTgtData *target_p = NULL; +#else struct RfuTgtData *target_p; +#endif struct RfuTgtData target_local; if (reqResult == 0)