From 35c4e9532ba13077ce18d83856cb04b8cae9c4c0 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Mon, 27 Jul 2020 18:01:05 +1000 Subject: [PATCH] Fix jsonptr's JSON output for CBOR simple values --- example/jsonptr/jsonptr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/jsonptr/jsonptr.cc b/example/jsonptr/jsonptr.cc index 7641b053..c3d842cd 100644 --- a/example/jsonptr/jsonptr.cc +++ b/example/jsonptr/jsonptr.cc @@ -1122,7 +1122,7 @@ write_cbor_simple_value(uint64_t tag, wuffs_base__slice_u8 s) { } if (!g_flags.output_cbor_metadata_as_json_comments) { - return nullptr; + return write_dst("null", 4); } uint8_t buf[WUFFS_BASE__U64__BYTE_LENGTH__MAX_INCL]; size_t n = wuffs_base__render_number_u64(