hlsdk-portable icon indicating copy to clipboard operation
hlsdk-portable copied to clipboard

Integer overflow on sending smoke and explo messages

Open FreeSlave opened this issue 1 year ago • 0 comments

If you set low or too high value for a damage of entity derived from CGrenade, the values sent in TE_EXPLOSION and TE_SMOKE are getting overflown, because they're sent as bytes.

Example: set sk_plr_9mmAR_grenade1 to 10 and test the AR grenade in singleplayer. The explosion and smoke effects will be too large.

Probably need to clamp between 1 and 255.

FreeSlave avatar Dec 31 '24 00:12 FreeSlave