Add jsonptr check for to-be-extended token length
diff --git a/example/jsonptr/jsonptr.cc b/example/jsonptr/jsonptr.cc
index fb4e230..099a379 100644
--- a/example/jsonptr/jsonptr.cc
+++ b/example/jsonptr/jsonptr.cc
@@ -1509,6 +1509,9 @@
                          ? ((uint64_t)(t.value_base_detail__sign_extended()))
                          : vbd;
         if (t.continued()) {
+          if (len != 0) {
+            return "main: internal error: unexpected to-be-extended length";
+          }
           g_token_extension.category = vbc;
           g_token_extension.detail = x;
           return nullptr;