From 409a8a3a430e9b2e5f95d41a8f285bb692901970 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sat, 25 Jul 2020 08:09:22 -0500 Subject: [PATCH] Fix #452 - Bad file marshal We forgot a call to janet_marshal_abstract, which corrupted the output. --- src/core/io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/io.c b/src/core/io.c index 4dbcee58..2b2c1c1b 100644 --- a/src/core/io.c +++ b/src/core/io.c @@ -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