From ffd6cf087b78beffd9cce75c4b197a9474c48504 Mon Sep 17 00:00:00 2001 From: rimio Date: Thu, 1 Mar 2018 21:51:15 +0200 Subject: Fixed printing of byte strings; fixed wrong type comparison on TAG --- src/ecbor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ecbor.c') diff --git a/src/ecbor.c b/src/ecbor.c index dbbed96..2a9b5fb 100644 --- a/src/ecbor.c +++ b/src/ecbor.c @@ -235,14 +235,14 @@ ecbor_get_tag_item (ecbor_item_t *tag, ecbor_item_t *item) if (!tag) { return ECBOR_ERR_NULL_ITEM; } - if (tag->major_type != ECBOR_MT_ARRAY) { + if (tag->major_type != ECBOR_MT_TAG) { return ECBOR_ERR_INVALID_TYPE; } if (!item) { return ECBOR_ERR_NULL_VALUE; } - rc = ecbor_initialize_decode (&context, tag->value.items, tag->size); + rc = ecbor_initialize_decode (&context, tag->value.tag.child, tag->size); if (rc != ECBOR_OK) { return rc; } -- cgit v1.2.3