UCRP_WETPLAYER: Adjust SOC load to not Z_StrDup before confirming other data is valid, to prevent memory leak

This commit is contained in:
toaster 2023-03-06 22:38:37 +00:00
parent f6a83d2161
commit ff926440d5

View file

@ -2643,7 +2643,6 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
ty = UCRP_WETPLAYER;
re = MFE_UNDERWATER;
x1 = 1;
stringvar = Z_StrDup(params[1]);
if (params[2])
{
@ -2655,6 +2654,8 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
return;
}
}
stringvar = Z_StrDup(params[1]);
}
else
{