Left 4 Dead 2

Left 4 Dead 2

Admin Menu
Suggestion: Adjust max_health to prevent potential overflow in the plugin
I noticed that this plugin allow to set max_health to 9999999999999999. However, based on SourceMod's dump, iMaxHealth is a 4-byte (int32_t) value, meaning the actual maximum possible value is 2147483647.
Currently, the engine automatically corrects any overflow, but setting such a large value might cause confusion for users who expect 9999999999999999 to take effect.
I recommend adjusting the code to ensure that max_health does not exceed 2147483647.
This would prevent unintended behavior and make the plugin more stable and user-friendly.

How do you think?
Last edited by HSMan9999; 21 Mar @ 10:53pm