Skip to content

Commit ec1ebfe

Browse files
committed
cborencoder: Fix cbor_encode_raw
`append_to_buffer` now expects to be told what we're appending, since the docs here say `raw` must be valid CBOR, it seems `CborEncoderAppendCborData` is the most appropriate value here.
1 parent e980a75 commit ec1ebfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cborencoder.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ CborError cbor_encode_byte_string(CborEncoder *encoder, const uint8_t *string, s
501501
*/
502502
CborError cbor_encode_raw(CborEncoder *encoder, const uint8_t *raw, size_t length)
503503
{
504-
return append_to_buffer(encoder, raw, length);
504+
return append_to_buffer(encoder, raw, length, CborEncoderAppendCborData);
505505
}
506506

507507
/**

0 commit comments

Comments
 (0)