mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
[MIRROR] Prevents NAN amounts infecting the chemistry reagent container system [MDB IGNORE] (#15482)
* Prevents NAN amounts infecting the chemistry reagent container system (#69017) * Don't allow NAN into the reagent holders, and better reporting on add reagent and remove reagent * Replace admin message with stack_trace and return and improve math defines to check for finite numbers * Refactor things to use these new defines, attempts to fix unit tests by filtering out <= 0 amounts first Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com> * Prevents NAN amounts infecting the chemistry reagent container system Co-authored-by: oranges <email@oranges.net.nz> Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
This commit is contained in:
co-authored by
Aleksej Komarov
oranges
parent
7a839dc37f
commit
8b2badefef
@@ -357,7 +357,8 @@
|
||||
return
|
||||
if(!is_valid_recipe(recipe, recipes)) //href exploit protection
|
||||
return
|
||||
if(!multiplier || multiplier < 1) //href exploit protection
|
||||
if(!multiplier || multiplier < 1 || !IS_FINITE(multiplier)) //href exploit protection
|
||||
stack_trace("Invalid multiplier value in stack creation [multiplier], [usr] is likely attempting an exploit")
|
||||
return
|
||||
if(!building_checks(builder, recipe, multiplier))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user