2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-02-26 21:41:06 +03:00

Fix local-buffer overrun, may undefined behavior with hitbox blending or crash (reverse-engineering mistake)

This commit is contained in:
s1lentq 2021-02-06 20:13:38 +07:00
parent 169020067b
commit 722e19df31

View File

@ -785,7 +785,7 @@ hull_t *SV_HullForStudioModel(const edict_t *pEdict, const vec_t *mins, const ve
int iBlend;
R_StudioPlayerBlend(pseqdesc, &iBlend, angles);
unsigned char blending = (unsigned char)iBlend;
unsigned char blending[2] = { (unsigned char)iBlend, 0 };
unsigned char controller[4] = { 0x7F, 0x7F, 0x7F, 0x7F };
return R_StudioHull(
g_psv.models[pEdict->v.modelindex],
@ -795,7 +795,7 @@ hull_t *SV_HullForStudioModel(const edict_t *pEdict, const vec_t *mins, const ve
pEdict->v.origin,
size,
controller,
&blending,
blending,
pNumHulls,
pEdict,
bSkipShield);