Merge pull request #150 from zeptometer/fix-append

append returns '() when given no args
This commit is contained in:
Yuichi Nishiwaki 2014-06-26 18:06:10 +09:00
commit 346a687e25
1 changed files with 4 additions and 0 deletions

View File

@ -501,6 +501,10 @@ pic_pair_append(pic_state *pic)
pic_get_args(pic, "*", &argc, &args); pic_get_args(pic, "*", &argc, &args);
if (argc == 0) {
return pic_nil_value();
}
list = args[--argc]; list = args[--argc];
while (argc-- > 0) { while (argc-- > 0) {