From 20b861ac8963273537b03273fd034963f40530f8 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 26 Oct 2019 13:28:12 +0200 Subject: [PATCH] VALUE posix --- src/posix.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/posix.c b/src/posix.c index 5d504fce..eb6406bf 100644 --- a/src/posix.c +++ b/src/posix.c @@ -252,8 +252,11 @@ open_output_file (SCM x) /*:((arity . n)) */ x = cdr (x); int mode = S_IRUSR | S_IWUSR; if (TYPE (x) == TPAIR) - if (TYPE (car (x)) == TNUMBER) - mode = VALUE (car (x)); + { + SCM i = car (x); + if (TYPE (i) == TNUMBER) + mode = VALUE (i); + } return make_number (mes_open (cell_bytes (STRING (file_name)), O_WRONLY | O_CREAT | O_TRUNC, mode)); }