From 358f788b6155f599b5c6f832b706fc3ce01b979a Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sun, 13 Aug 2023 21:09:04 +0200 Subject: [PATCH] port: read gbi command id correctly in gfxReplaceGbiCommands --- src/game/gfxreplace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/gfxreplace.c b/src/game/gfxreplace.c index e8a1de121..73174e085 100644 --- a/src/game/gfxreplace.c +++ b/src/game/gfxreplace.c @@ -308,7 +308,11 @@ void gfxReplaceGbiCommands(Gfx *startgdl, Gfx *endgdl, s32 type) Gfx *gdl = startgdl; +#ifdef PLATFORM_N64 while ((endgdl && gdl < endgdl) || (!endgdl && *(s8 *)gdl != G_ENDDL)) { +#else + while ((endgdl && gdl < endgdl) || (!endgdl && (s8)gdl->bytes[GFX_W0_BYTE(0)] != G_ENDDL)) { +#endif Gfx *src = groups[type]; while (src->words.w0 != 0) {