CBOR monotone: Major type 7 is short field encoded

This commit is contained in:
Reynir Björnsson 2021-10-09 16:29:40 +02:00
parent 9e8f765703
commit 3edd956493

View file

@ -163,7 +163,7 @@ module Simple = struct
Int64.unsigned_compare n n' < 0 ||
Int64.unsigned_compare n n' = 0 &&
begin
List.mem (major_typ s) [2; 3; 4; 5; 7 (* XXX: unsure about 7 *)] &&
List.mem (major_typ s) [2; 3; 4; 5] &&
let len = Int64.to_int n in
String.sub s off len < String.sub s' off len
end