[bugfix] segv on pic_receive

This commit is contained in:
Yuichi Nishiwaki 2014-02-20 18:57:01 +09:00
parent 1d7e46fbdf
commit 19f426a4f4
1 changed files with 1 additions and 1 deletions

View File

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