Parser: fix reading it->extra on big endian when bytesNeeded == 1

Signed-off-by: Dmitry Shachnev <mitya57@gmail.com>
diff --git a/src/cborparser.c b/src/cborparser.c
index c6a1b76..74d91a3 100644
--- a/src/cborparser.c
+++ b/src/cborparser.c
@@ -203,10 +203,13 @@
         it->extra = 0;
 
         /* read up to 16 bits into it->extra */
-        if (bytesNeeded <= 2) {
+        if (bytesNeeded == 1) {
+            uint8_t extra;
+            read_bytes_unchecked(it, &extra, 1, bytesNeeded);
+            it->extra = extra;
+        } else if (bytesNeeded == 2) {
             read_bytes_unchecked(it, &it->extra, 1, bytesNeeded);
-            if (bytesNeeded == 2)
-                it->extra = cbor_ntohs(it->extra);
+            it->extra = cbor_ntohs(it->extra);
         } else {
             cbor_static_assert(CborIteratorFlag_IntegerValueTooLarge == (Value32Bit & 3));
             cbor_static_assert((CborIteratorFlag_IntegerValueIs64Bit |