]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/prod.c
(buy, move, prod, dodistribute, produce): Obey ITEM_MAX. Previous
[empserver] / src / lib / commands / prod.c
index 34b220704359a7d74d651146df87e94e78f9038b..bd9f285c1e7660dba4181e87f6ada5caef7efd7f 100644 (file)
@@ -286,11 +286,9 @@ prod(void)
            if (real < 0.0)
                real = 0.0;
            /* production backlog? */
-           if ((there = sect.sct_item[vtype]) >= 9999) {
-               there = 9999;
-           }
-           act = min(act, (9999 - there));
-           max = min(max, (9999 - there));
+           there = min(ITEM_MAX, sect.sct_item[vtype]);
+           act = min(act, ITEM_MAX - there);
+           max = min(max, ITEM_MAX - there);
        }
 
        if (prodeff != 0) {