fix: error return type in decodeMapHeader

This commit is contained in:
CJ van den Berg 2025-03-24 10:10:38 +01:00
parent 18f6438865
commit 1fccb83c70
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -347,7 +347,7 @@ fn decodeNInt(iter: *[]const u8, minor: u5) Error!i64 {
return -@as(i64, @intCast(try decodePInt(iter, minor) + 1));
}
pub fn decodeMapHeader(iter: *[]const u8) Error!usize {
pub fn decodeMapHeader(iter: *[]const u8) error{ TooShort, InvalidMapType, InvalidPIntType }!usize {
const t = try decodeType(iter);
if (t.type == cbor_magic_null)
return 0;