@@ -764,20 +764,20 @@ struct Input {
764
764
765
765
static const CborParserOperations byteArrayOps = {
766
766
/* can_read_bytes = */ [](const CborValue *value, size_t len) {
767
- auto input = static_cast <Input *>(value->source . token );
767
+ auto input = static_cast <Input *>(value->parser -> data . ctx );
768
768
return input->data .size () - input->consumed >= int (len);
769
769
},
770
770
/* read_bytes = */ [](const CborValue *value, void *dst, size_t offset, size_t len) {
771
- auto input = static_cast <Input *>(value->source . token );
771
+ auto input = static_cast <Input *>(value->parser -> data . ctx );
772
772
return memcpy (dst, input->data .constData () + input->consumed + offset, len);
773
773
},
774
774
/* advance_bytes = */ [](CborValue *value, size_t len) {
775
- auto input = static_cast <Input *>(value->source . token );
775
+ auto input = static_cast <Input *>(value->parser -> data . ctx );
776
776
input->consumed += int (len);
777
777
},
778
778
/* transfer_string = */ [](CborValue *value, const void **userptr, size_t offset, size_t len) {
779
779
// ###
780
- auto input = static_cast <Input *>(value->source . token );
780
+ auto input = static_cast <Input *>(value->parser -> data . ctx );
781
781
if (input->data .size () - input->consumed < int (len + offset))
782
782
return CborErrorUnexpectedEOF;
783
783
input->consumed += int (offset);
0 commit comments