Fix a bug due to the operator precedence of C.

The expression ```! pic_length(pic, spec) == 3``` is treated as ```(!
pic_length(pic, spec)) == 3``` since ! has higher precedence than ==.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
This commit is contained in:
OGINO Masanori 2014-09-19 18:28:55 +09:00
parent 3aa3669723
commit 6a784897a4
1 changed files with 1 additions and 1 deletions

2
lib.c
View File

@ -158,7 +158,7 @@ export(pic_state *pic, pic_value spec)
} else { /* (export (rename a b)) */
if (! pic_list_p(spec))
goto fail;
if (! pic_length(pic, spec) == 3)
if (! (pic_length(pic, spec) == 3))
goto fail;
if (! pic_eq_p(pic_car(pic, spec), pic_sym_value(sRENAME)))
goto fail;