mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
sexp_get_output_bytevector should check for errors from sexp_get_output_string
This commit is contained in:
parent
6ef0be789d
commit
c2fe35e5d6
1 changed files with 2 additions and 1 deletions
|
@ -291,6 +291,7 @@ sexp sexp_get_output_bytevector (sexp ctx, sexp self, sexp port) {
|
|||
return sexp_xtype_exception(ctx, self, "not a binary port", port);
|
||||
sexp_gc_preserve1(ctx, res);
|
||||
res = sexp_get_output_string(ctx, port);
|
||||
if (!sexp_exceptionp(res))
|
||||
res = sexp_string_to_bytes(ctx, res);
|
||||
sexp_gc_release1(ctx);
|
||||
return res;
|
||||
|
|
Loading…
Add table
Reference in a new issue