From b5d6f8d0386bc342da951807f00e2bd5a5bf74d3 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Mon, 6 Apr 2020 20:57:40 +1000 Subject: [PATCH] Have example/jsonfindptrs check unpaired keys --- example/jsonfindptrs/jsonfindptrs.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/example/jsonfindptrs/jsonfindptrs.cc b/example/jsonfindptrs/jsonfindptrs.cc index 722db8d3..2e3ae872 100644 --- a/example/jsonfindptrs/jsonfindptrs.cc +++ b/example/jsonfindptrs/jsonfindptrs.cc @@ -591,6 +591,9 @@ JsonThing::parse_object(TokenStream& ts) { return Result("main: internal error: unexpected non-string key"); } } + if (have_key) { + return Result("main: internal error: unpaired key"); + } return Result("", jt); }