diff --git a/src/deh_lua.c b/src/deh_lua.c index 6c97cda93..224d0c010 100644 --- a/src/deh_lua.c +++ b/src/deh_lua.c @@ -143,7 +143,7 @@ static inline int lib_freeslot(lua_State *L) CONS_Printf("Skincolor SKINCOLOR_%s allocated.\n",word); FREE_SKINCOLORS[i] = Z_Malloc(strlen(word)+1, PU_STATIC, NULL); strcpy(FREE_SKINCOLORS[i],word); - skincolors[i].cache_spraycan = UINT16_MAX; + skincolors[SKINCOLOR_FIRSTFREESLOT+i].cache_spraycan = UINT16_MAX; numskincolors++; lua_pushinteger(L, SKINCOLOR_FIRSTFREESLOT + i); r++; diff --git a/src/deh_soc.c b/src/deh_soc.c index b0e7a473a..32475d0a6 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -334,7 +334,7 @@ void readfreeslots(MYFILE *f) CONS_Printf("Skincolor SKINCOLOR_%s allocated.\n",word); FREE_SKINCOLORS[i] = Z_Malloc(strlen(word)+1, PU_STATIC, NULL); strcpy(FREE_SKINCOLORS[i],word); - skincolors[i].cache_spraycan = UINT16_MAX; + skincolors[SKINCOLOR_FIRSTFREESLOT+i].cache_spraycan = UINT16_MAX; numskincolors++; break; }