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