From: Kirill Simonov Date: Mon, 11 Oct 2010 06:29:07 +0000 (+0000) Subject: Fixed a bug which prevented an empty mapping from being used as a simple key (#150... X-Git-Tag: upstream/0.1.4^2~5 X-Git-Url: http://andersk.mit.edu/gitweb/libyaml.git/commitdiff_plain/bbaaf49bc48a283859625871216b487b8bb11af8 Fixed a bug which prevented an empty mapping from being used as a simple key (#150, thank to spitzak(at)rhythm(dot)com). --- diff --git a/src/emitter.c b/src/emitter.c index 9a5b3fa..c4b56a2 100644 --- a/src/emitter.c +++ b/src/emitter.c @@ -1154,7 +1154,7 @@ yaml_emitter_check_simple_key(yaml_emitter_t *emitter) break; case YAML_MAPPING_START_EVENT: - if (!yaml_emitter_check_empty_sequence(emitter)) + if (!yaml_emitter_check_empty_mapping(emitter)) return 0; length += emitter->anchor_data.anchor_length + emitter->tag_data.handle_length