1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 11:09:54 +00:00

Fix #452 - Bad file marshal

We forgot a call to janet_marshal_abstract, which corrupted the output.
This commit is contained in:
Calvin Rose 2020-07-25 08:09:22 -05:00
parent 1ba3f72e4c
commit 409a8a3a43

View File

@ -339,6 +339,7 @@ static int io_file_get(void *p, Janet key, Janet *out) {
static void io_file_marshal(void *p, JanetMarshalContext *ctx) {
JanetFile *iof = (JanetFile *)p;
if (ctx->flags & JANET_MARSHAL_UNSAFE) {
janet_marshal_abstract(ctx, p);
#ifdef JANET_WINDOWS
janet_marshal_int(ctx, _fileno(iof->file));
#else