diff --git a/src/posix.c b/src/posix.c index 92891745..03af2a61 100644 --- a/src/posix.c +++ b/src/posix.c @@ -258,8 +258,9 @@ open_output_file (SCM x) /*:((arity . n)) */ SCM file_name = car (x); x = cdr (x); int mode = S_IRUSR | S_IWUSR; - if (TYPE (x) == TPAIR && TYPE (car (x)) == TNUMBER) - mode = VALUE (car (x)); + if (TYPE (x) == TPAIR) + if (TYPE (car (x)) == TNUMBER) + mode = VALUE (car (x)); return make_number (mes_open (cell_bytes (STRING (file_name)), O_WRONLY | O_CREAT | O_TRUNC, mode)); }