X-Git-Url: http://andersk.mit.edu/gitweb/libyaml.git/blobdiff_plain/c45550e5cf265bf6877cad127faa9854851e291e..5070705b069f4732344021baa7d4baf3c7ac04e3:/src/dumper.c?ds=sidebyside 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))