From 0d62fe65bc0f4836a5a3eae960bfd8807f0cc1ec Mon Sep 17 00:00:00 2001 From: NepDisk <16447892+NepDisk@users.noreply.github.com> Date: Thu, 5 Sep 2024 16:04:24 -0400 Subject: [PATCH] Fix map load crash --- src/deh_soc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/deh_soc.c b/src/deh_soc.c index 9ca73d099..82dee04f2 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -1040,13 +1040,13 @@ static mapheader_lighting_t *usemaplighting(INT32 mapnum, const char *word) { if (fastncmp(word, "ENCORE", 6)) { - mapheaderinfo[mapnum]->use_encore_lighting = true; + mapheaderinfo[mapnum-1]->use_encore_lighting = true; - return &mapheaderinfo[mapnum]->lighting_encore; + return &mapheaderinfo[mapnum-1]->lighting_encore; } else { - return &mapheaderinfo[mapnum]->lighting; + return &mapheaderinfo[mapnum-1]->lighting; } }