From 62a85cf43a7e0e2cc7ab9c8511ab69836c4fa7a7 Mon Sep 17 00:00:00 2001 From: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Tue, 14 Oct 2025 19:12:50 -0500 Subject: [PATCH] Decode 'undefined' values (simple, 23) as `nil`. --- Sources/CBOR/Decoder/Containers/DataRegion.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/CBOR/Decoder/Containers/DataRegion.swift b/Sources/CBOR/Decoder/Containers/DataRegion.swift index b9b685f..b3077ea 100644 --- a/Sources/CBOR/Decoder/Containers/DataRegion.swift +++ b/Sources/CBOR/Decoder/Containers/DataRegion.swift @@ -66,7 +66,7 @@ struct DataRegion { func isNil() -> Bool { // This shouldn't modify the data stack. We just peek here. - type == .simple && argument == 22 + type == .simple && (argument == 22 || argument == 23) } /// Reads the next variable-sized integer off the data stack. -- 2.51.2