From b6dfdd1478f06d4f7dbdc272adde96033095f1d8 Mon Sep 17 00:00:00 2001 From: Prakxo Date: Tue, 13 Aug 2024 17:22:51 +0200 Subject: [PATCH] fix the bugfixes build fix --- src/m_npc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/m_npc.c b/src/m_npc.c index c25e0bde..9e57f4d5 100644 --- a/src/m_npc.c +++ b/src/m_npc.c @@ -362,7 +362,7 @@ extern void mNpc_CopyAnimalMemory(Anmmem_c* dst, Anmmem_c* src) { */ extern void mNpc_AddFriendship(Anmmem_c* memory, int amount) { - int friendship = memory->friendship + amount; + int friendship; /* @BUG - devs checked for memory being NULL *after* deferencing it */ #ifdef BUGFIXES @@ -371,6 +371,8 @@ extern void mNpc_AddFriendship(Anmmem_c* memory, int amount) { } #endif + friendship = memory->friendship + amount; + #ifndef BUGFIXES if (memory == NULL) {