From 252ed746ed1d301b262b939a292e8069e8ccccf0 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Wed, 20 Apr 2022 13:50:58 -0400 Subject: [PATCH] fix: has_valid_size use expected_size --- runtime/include/json.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/include/json.h b/runtime/include/json.h index 62f6e6a..38d3a05 100644 --- a/runtime/include/json.h +++ b/runtime/include/json.h @@ -39,8 +39,8 @@ jsmn_type(jsmntype_t type) static inline bool has_valid_size(jsmntok_t tok, char *key, int expected_size) { - if (tok.size != 1) { - fprintf(stderr, "%s does not have a value\n", key); + if (tok.size != expected_size) { + fprintf(stderr, "%s has size %d, expected %d\n", key, tok.size, expected_size); return false; }