Bulletproofing

We already get the full info field, so fields will be always be fully totalled. Let's not assume it's zero.
This commit is contained in:
Hawk_v3
2019-10-07 02:28:42 +01:00
parent 38511bf891
commit 532316f35f
@@ -31,14 +31,15 @@
if(paper_title)
P.name = paper_title
P.update_icon()
P.fields = count_fields(P.info, P.fields)
P.fields = count_fields(P.info)
P.updateinfolinks()
stored_paper--
return 1
/obj/item/weapon/computer_hardware/nano_printer/proc/count_fields(var/info, var/fields)
/obj/item/weapon/computer_hardware/nano_printer/proc/count_fields(var/info)
//Count the fields. This is taken directly from paper.dm, /obj/item/weapon/paper/proc/parsepencode(). -Hawk_v3
var/fields = 0
var/t = info
var/laststart = 1
while(1)