diff --git a/src/m_island.c b/src/m_island.c index b79d6e9e..9d26a8c8 100644 --- a/src/m_island.c +++ b/src/m_island.c @@ -364,8 +364,8 @@ static void mISL_agb_to_gc_fllot_bit(mHm_fllot_bit_c* gc, u32* agb) { gc->wall_original = (u32)gc->wall_original; gc->floor_original = (u32)gc->floor_original; #else - gc->wall_original = agb->wall_original; - gc->floor_original = agb->floor_original; + gc->wall_original = ((mHm_fllot_bit_c*)(agb))->wall_original; + gc->floor_original = ((mHm_fllot_bit_c*)(agb))->floor_original; #endif } diff --git a/src/m_npc.c b/src/m_npc.c index 9c70f023..c25e0bde 100644 --- a/src/m_npc.c +++ b/src/m_npc.c @@ -362,6 +362,8 @@ extern void mNpc_CopyAnimalMemory(Anmmem_c* dst, Anmmem_c* src) { */ extern void mNpc_AddFriendship(Anmmem_c* memory, int amount) { + int friendship = memory->friendship + amount; + /* @BUG - devs checked for memory being NULL *after* deferencing it */ #ifdef BUGFIXES if (memory == NULL) { @@ -369,7 +371,6 @@ extern void mNpc_AddFriendship(Anmmem_c* memory, int amount) { } #endif - int friendship = memory->friendship + amount; #ifndef BUGFIXES if (memory == NULL) {