frontend/device.c, com_alter_common(), #4/11 rewrite while() loop

This commit is contained in:
rlar 2015-12-26 18:59:48 +01:00
parent 80b76ebeb2
commit 247767e3bf
1 changed files with 1 additions and 2 deletions

View File

@ -1330,15 +1330,14 @@ com_alter_common(wordlist *wl, int do_model)
type &= IF_VARTYPES;
if (type == IF_REALVEC) {
list = TMALLOC(double, 1);
tmp = INPevaluate(&xsbuf, &error, 1);
for (;;) {
tmp = INPevaluate(&xsbuf, &error, 1);
if (error)
break;
/*printf(" returning vector value %g\n", tmp); */
i++;
list = TREALLOC(double, list, i);
list[i-1] = tmp;
tmp = INPevaluate(&xsbuf, &error, 1);
}
dv->v_realdata = list;
}