# | Line 42 | Line 42 | plan_transport(MIGRATION *mig) | |
---|---|---|
42 | progname); | |
43 | exit(1); | |
44 | } | |
45 | + | if (n > mtx_nrows(mig)+mtx_ncols(mig)-1) { |
46 | + | fprintf(stderr, "%s: signature overflow in plan_transport()!\n", |
47 | + | progname); |
48 | + | exit(1); |
49 | + | } |
50 | while (n-- > 0) /* assign sparse matrix */ | |
51 | mtx_coef(mig, flow[n].from, flow[n].to) = flow[n].amount; | |
52 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |