diff options
Diffstat (limited to 'ext/psych/yaml/dumper.c')
-rw-r--r-- | ext/psych/yaml/dumper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/yaml/dumper.c b/ext/psych/yaml/dumper.c index 29fb9c0784..1fe940b674 100644 --- a/ext/psych/yaml/dumper.c +++ b/ext/psych/yaml/dumper.c @@ -131,7 +131,7 @@ yaml_emitter_dump(yaml_emitter_t *emitter, yaml_document_t *document) assert(emitter->opened); /* Emitter should be opened. */ - emitter->anchors = yaml_malloc(sizeof(*(emitter->anchors)) + emitter->anchors = (yaml_anchors_t*)yaml_malloc(sizeof(*(emitter->anchors)) * (document->nodes.top - document->nodes.start)); if (!emitter->anchors) goto error; memset(emitter->anchors, 0, sizeof(*(emitter->anchors)) |