From 6185771f0cd04763c18e6c77bb35da1116225db3 Mon Sep 17 00:00:00 2001 From: hayaunderscore Date: Tue, 4 Jun 2024 09:45:47 +0800 Subject: [PATCH] Check if skin number is postive before setting replay skin colormaps Fixes #200. --- src/lua_hudlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 824825fe7..3e69f1067 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -1045,7 +1045,7 @@ static int libd_getColormap(lua_State *L) skinnum = i; } - if (demo.playback) + if (demo.playback && skinnum >= 0) skinnum = demo.skinlist[skinnum].mapping; // all was successful above, now we generate the colormap at last!