Unbreak OF_interpret() and its standard implementation after r186347.

This commit is contained in:
Marius Strobl 2009-03-29 15:10:49 +00:00
parent b1a0a22d44
commit 49bbb93c07
2 changed files with 4 additions and 2 deletions

View File

@ -204,7 +204,7 @@ ofw_std_interpret(ofw_t ofw, const char *cmd, int nreturns,
}
status = args.slot[i++];
while (i < 1 + nreturns)
returns[j] = args.slot[i++];
returns[j++] = args.slot[i++];
return (status);
}

View File

@ -164,9 +164,11 @@ OF_interpret(const char *cmd, int nreturns, ...)
int status;
status = OFW_INTERPRET(ofw_obj, cmd, nreturns, slots);
if (status == -1)
return (status);
va_start(ap, nreturns);
while (i < 1 + nreturns)
while (i < nreturns)
*va_arg(ap, cell_t *) = slots[i++];
va_end(ap);