Fix a memory write issue with plasma_{A,B,C}

plasma_A[5] = {}; will write the default value for int to the sixth element of plasma_A, causing a global-buffer-overflow.

I assume the intention here was to fill these three arrays with zeroes, which is what I did with the memset calls.
This commit is contained in:
Kevin Caccamo 2023-07-12 03:59:37 -04:00 committed by Mitchell Richters
parent b87a730a8f
commit 80ac9f6416

View file

@ -107,9 +107,9 @@ void menu_DoPlasma()
{
nPlasmaTile = TexMan.GetGameTexture(aTexIds[kTexPlasmaTile1]);
nPlasmaTileAlt = TexMan.GetGameTexture(aTexIds[kTexPlasmaTile2]);
plasma_A[5] = {};
plasma_B[5] = {};
plasma_C[5] = {};
memset(plasma_A, 0, sizeof(plasma_A));
memset(plasma_B, 0, sizeof(plasma_B));
memset(plasma_C, 0, sizeof(plasma_C));
}
const auto nLogoTexid = GameLogo();