frontend/device.c, com_alter_common(), #8/11 reorder

This commit is contained in:
rlar 2015-12-26 19:00:04 +01:00
parent 245ef2bbf1
commit f04d6cffc2
1 changed files with 6 additions and 5 deletions

View File

@ -1330,6 +1330,12 @@ com_alter_common(wordlist *wl, int do_model)
list = TREALLOC(double, list, i + 1);
list[i++] = tmp;
}
if (i < 1) {
fprintf(cp_err, "Error: cannot evaluate new parameter value.\n");
return;
}
dv = TMALLOC(struct dvec, 1);
if (!dv)
return;
@ -1339,11 +1345,6 @@ com_alter_common(wordlist *wl, int do_model)
dv->v_realdata = list;
dv->v_length = i;
if (dv->v_length < 1) {
fprintf(cp_err, "Error: cannot evaluate new parameter value.\n");
return;
}
/* Here I was, to change the inclusion in the circuit.
* will have to revise that dv is right for its insertion.
*/