ref: 59162f80b7b16674f701d3a9bbdf257761a9f753
parent: 6a5d79c24a3aacf25079421ffe9a2d5e0bd41888
author: qwx <qwx@sciops.net>
date: Mon Jul 12 03:13:03 EDT 2021
sim: check for invalid resource amounts
--- a/sim.c
+++ b/sim.c
@@ -174,6 +174,10 @@
Mobj *mo;
Resource *r;
+ if(amount <= 0){
+ werrstr("spawnresource: invalid amount");
+ return -1;
+ }
if((mo = mapspawn(x, y, o)) == nil)
return -1;
mo->team = 0;