From bd9f68d739f990c92cde70d00f096cd86562eb96 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Sun, 20 Oct 2024 23:44:44 +0200 Subject: [PATCH] fixup! fixup! Lib: CBOR message streams and channels --- lib/cbor-parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cbor-parser.c b/lib/cbor-parser.c index d0a9239a..80fad450 100644 --- a/lib/cbor-parser.c +++ b/lib/cbor-parser.c @@ -249,8 +249,8 @@ cbor_stream_rx(sock *s, uint sz) if (ctx->type != 4) CSTR_PARSER_ERROR("Expected array, got %u", ctx->type); - if (ctx->value != 3) - CSTR_PARSER_ERROR("Expected array of length exactly 3"); + if (ctx->value < 2) + CSTR_PARSER_ERROR("Expected array of length at least 2"); stream->state = CSTR_EXPECT_ID; break;