reset ci->retc when pic_receive is called

This commit is contained in:
Yuichi Nishiwaki 2014-02-20 17:19:40 +09:00
parent bad8daa813
commit 213177eb10
1 changed files with 4 additions and 4 deletions

View File

@ -228,11 +228,11 @@ pic_receive(pic_state *pic, size_t n, pic_value *argv)
ci = pic->ci + 1;
retc = ci->retc;
for (i = 0; i < retc; ++i) {
if (i < n) {
argv[i] = ci->fp[i];
}
for (i = 0; i < n; ++i) {
argv[i] = ci->fp[i];
}
ci->retc = 1;
return retc;
}