append returns '() when given no args

This commit is contained in:
Yuito Murase 2014-06-26 17:40:26 +09:00
parent 7b1cc27b08
commit 8374297a22
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) {