X-Git-Url: http://andersk.mit.edu/gitweb/libyaml.git/blobdiff_plain/0f400264da7f8230f00688a666132c861939906e..aa6f0e8a0a8257181e428c8af720d98e964f69d9:/src/dumper.c diff --git a/src/dumper.c b/src/dumper.c index 29fb9c0..1fe940b 100644 --- a/src/dumper.c +++ b/src/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))