mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-10 22:47:33 +02:00
Fixing check on valid file descriptors.
This commit is contained in:
parent
a3e6a6c1e8
commit
354ceb2113
1 changed files with 1 additions and 1 deletions
2
sexp.c
2
sexp.c
|
@ -1528,7 +1528,7 @@ sexp sexp_get_output_string_op (sexp ctx, sexp self, sexp_sint_t n, sexp out) {
|
||||||
sexp sexp_open_input_file_descriptor (sexp ctx, sexp self, sexp_sint_t n, sexp fileno, sexp shutdownp) {
|
sexp sexp_open_input_file_descriptor (sexp ctx, sexp self, sexp_sint_t n, sexp fileno, sexp shutdownp) {
|
||||||
sexp_gc_var2(res, str);
|
sexp_gc_var2(res, str);
|
||||||
sexp_assert_type(ctx, sexp_filenop, SEXP_FILENO, fileno);
|
sexp_assert_type(ctx, sexp_filenop, SEXP_FILENO, fileno);
|
||||||
if (sexp_unbox_fixnum(fileno) < 0)
|
if (sexp_fileno_fd(fileno) < 0)
|
||||||
return sexp_user_exception(ctx, self, "invalid file descriptor", fileno);
|
return sexp_user_exception(ctx, self, "invalid file descriptor", fileno);
|
||||||
sexp_gc_preserve2(ctx, res, str);
|
sexp_gc_preserve2(ctx, res, str);
|
||||||
str = sexp_make_string(ctx, sexp_make_fixnum(SEXP_PORT_BUFFER_SIZE), SEXP_VOID);
|
str = sexp_make_string(ctx, sexp_make_fixnum(SEXP_PORT_BUFFER_SIZE), SEXP_VOID);
|
||||||
|
|
Loading…
Add table
Reference in a new issue