Citation payments check for valid amount (#76760)

## About The Pull Request

Fixes https://github.com/tgstation/tgstation/issues/76705

## Why It's Good For The Game

Citations shouldn't be exploitable for free money.

## Changelog

🆑 LT3
fix: Security records no longer accept negative values for citation
payment
/🆑
This commit is contained in:
lessthanthree
2023-07-12 19:33:02 +02:00
committed by GitHub
parent 98bd793771
commit bb4ff196b3
+3
View File
@@ -32,6 +32,9 @@
/// Pays off a fine and attempts to fix any weird values.
/datum/crime/citation/proc/pay_fine(amount)
if(amount <= 0)
return FALSE
paid += amount
if(paid > fine)
paid = fine