aboutsummaryrefslogtreecommitdiff
path: root/core/encoding/cbor
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2023-12-23 18:12:13 +0100
committerLaytan Laats <laytanlaats@hotmail.com>2024-03-04 17:26:19 +0100
commit72d5b87b52fd4a1fb92819121e7f17b9118dac99 (patch)
treef00adff2383ceee72df8b76df29e00c7f533aa35 /core/encoding/cbor
parent154e0d41c6f77feb8a11ff8a6cb4449c11dd767e (diff)
encoding/cbor: clean
Diffstat (limited to 'core/encoding/cbor')
-rw-r--r--core/encoding/cbor/coding.odin5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/encoding/cbor/coding.odin b/core/encoding/cbor/coding.odin
index ee928f68e..9dd6d2639 100644
--- a/core/encoding/cbor/coding.odin
+++ b/core/encoding/cbor/coding.odin
@@ -316,9 +316,8 @@ _encode_progress_end :: proc(e: ^Encoder, is_begin: bool, tmp: runtime.Arena_Tem
}
_decode_header :: proc(r: io.Reader) -> (hdr: Header, err: io.Error) {
- buf: [1]byte = ---
- io.read_full(r, buf[:]) or_return
- return Header(buf[0]), nil
+ hdr = Header(_decode_u8(r) or_return)
+ return
}
_header_split :: proc(hdr: Header) -> (Major, Add) {