From 3edd956493db78aa7a95de4c0ecd5f6f5b1d9720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Sat, 9 Oct 2021 16:29:40 +0200 Subject: [PATCH] CBOR monotone: Major type 7 is short field encoded --- cbor/CBOR.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cbor/CBOR.ml b/cbor/CBOR.ml index 77345bf..0089853 100644 --- a/cbor/CBOR.ml +++ b/cbor/CBOR.ml @@ -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