From 42ad2777fd2e8c358d0a10062cdb715320656087 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Wed, 26 Oct 2016 22:35:02 +0800 Subject: js: Handle null for all options supplied as strings. --- source/tools/murun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tools/murun.c b/source/tools/murun.c index e3588954..898ed456 100644 --- a/source/tools/murun.c +++ b/source/tools/murun.c @@ -3194,7 +3194,7 @@ static void ffi_PDFDocument_save(js_State *J) fz_context *ctx = js_getcontext(J); pdf_document *pdf = js_touserdata(J, 0, "pdf_document"); const char *filename = js_tostring(J, 1); - const char *options = js_isdefined(J, 2) ? js_tostring(J, 2) : NULL; + const char *options = js_iscoercible(J, 2) ? js_tostring(J, 2) : NULL; pdf_write_options pwo; fz_try(ctx) { -- cgit v1.2.3