don't COPY_FLAGS null flags; just initialize to 0s

This commit is contained in:
david parsons
2019-12-08 08:16:22 -08:00
parent b9e867b574
commit fd801c6951
+5 -2
View File
@@ -1474,8 +1474,11 @@ mkd_compile(Document *doc, mkd_flag_t* flags)
doc->ctx->ref_prefix= doc->ref_prefix;
doc->ctx->cb = &(doc->cb);
sayflags("flags", flags, stderr);
COPY_FLAGS(doc->ctx->flags,*flags);
sayflags("used ", &(doc->ctx->flags), stderr);
if (flags)
COPY_FLAGS(doc->ctx->flags, *flags);
else
mkd_init_flags(&doc->ctx->flags);
sayflags("used ", &doc->ctx->flags, stderr);
CREATE(doc->ctx->in);
doc->ctx->footnotes = malloc(sizeof doc->ctx->footnotes[0]);
doc->ctx->footnotes->reference = 0;