Fix recently created bug in append_well_controls().

This commit is contained in:
Atgeirr Flø Rasmussen 2012-05-03 12:48:56 +02:00
parent 18ace3c137
commit 373a4f2689

View File

@ -160,7 +160,7 @@ well_controls_reserve(int nctrl, int nphases, struct WellControls *ctrl)
if (target != NULL) { ctrl->target = target; ok++; }
if (distr != NULL) { ctrl->distr = distr ; ok++; }
if (ok == 2) {
if (ok == 3) {
m = ctrl->data;
for (c = m->cpty; c < nctrl; c++) {
ctrl->type [c] = BHP;
@ -173,7 +173,7 @@ well_controls_reserve(int nctrl, int nphases, struct WellControls *ctrl)
m->cpty = nctrl;
}
return ok == 2;
return ok == 3;
}