From 96a6fe85f1088bc76763af07b389260c25d9aa96 Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 5 Mar 2024 16:43:27 +0000 Subject: [PATCH] G_LoadDemoSkins: Actually pass the skin name to R_SkinAvailableEx, idiot Fixes the reported Emerl issue --- src/g_demo.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/g_demo.cpp b/src/g_demo.cpp index 7c472ccba..0610ddf5e 100644 --- a/src/g_demo.cpp +++ b/src/g_demo.cpp @@ -2033,7 +2033,6 @@ static void G_SaveDemoSkins(UINT8 **pp) static democharlist_t *G_LoadDemoSkins(savebuffer_t *info, UINT8 *worknumskins, boolean getclosest) { - char skin[17]; UINT8 i, byte, shif; democharlist_t *skinlist = NULL; @@ -2052,8 +2051,6 @@ static democharlist_t *G_LoadDemoSkins(savebuffer_t *info, UINT8 *worknumskins, I_Error("G_LoadDemoSkins: Insufficient memory to allocate list"); } - skin[16] = '\0'; - for (i = 0; i < (*worknumskins); i++) { INT32 result = -1; @@ -2071,7 +2068,7 @@ static democharlist_t *G_LoadDemoSkins(savebuffer_t *info, UINT8 *worknumskins, skinlist[i].kartweight = READUINT8(info->p); skinlist[i].flags = READUINT32(info->p); - result = R_SkinAvailableEx(skin, false); + result = R_SkinAvailableEx(skinlist[i].name, false); if (result == -1) { if (!getclosest)