Skip to content

Commit c32860c

Browse files
committed
cborinternal_p: Check for non-null "ops"
Instead of testing a bit in a flags bitmap. #208 (comment)
1 parent ffb1a36 commit c32860c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cborinternal_p.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ static inline void copy_current_position(CborValue *dst, const CborValue *src)
205205
static inline bool can_read_bytes(const CborValue *it, size_t n)
206206
{
207207
if (CBOR_PARSER_READER_CONTROL >= 0) {
208-
if (it->parser->flags & CborParserFlag_ExternalSource || CBOR_PARSER_READER_CONTROL != 0) {
208+
if (it->parser->ops != NULL || CBOR_PARSER_READER_CONTROL != 0) {
209209
#ifdef CBOR_PARSER_CAN_READ_BYTES_FUNCTION
210210
return CBOR_PARSER_CAN_READ_BYTES_FUNCTION(it, n);
211211
#else

0 commit comments

Comments
 (0)