on master help sign in
Deal with 0-length null strings
commit88a250bdde65a46f3eee2f16a71f36b7c5c51d82 authorMichael Snoyman <michael@snoyman.com> dateFri 9 Oct 2009, 00:23 (17 years ago) parent36fec93
1 file changed+2
c/api.c+2
c/api.c+2
@@ -824,6 +824,8 @@ yaml_scalar_event_initialize(yaml_event_t *event,
824824 yaml_char_t *value_copy = NULL;
825825
826826 assert(event); /* Non-NULL event object is expected. */
827+ /* following line added for Haskell yaml library */
828+ if (!value && !length) value = "";
827829 assert(value); /* Non-NULL anchor is expected. */
828830
829831 if (anchor) {