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:
parent
3aa3669723
commit
6a784897a4
2
lib.c
2
lib.c
|
@ -158,7 +158,7 @@ export(pic_state *pic, pic_value spec)
|
||||||
} else { /* (export (rename a b)) */
|
} else { /* (export (rename a b)) */
|
||||||
if (! pic_list_p(spec))
|
if (! pic_list_p(spec))
|
||||||
goto fail;
|
goto fail;
|
||||||
if (! pic_length(pic, spec) == 3)
|
if (! (pic_length(pic, spec) == 3))
|
||||||
goto fail;
|
goto fail;
|
||||||
if (! pic_eq_p(pic_car(pic, spec), pic_sym_value(sRENAME)))
|
if (! pic_eq_p(pic_car(pic, spec), pic_sym_value(sRENAME)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
Loading…
Reference in New Issue