parent
7c819065e0
commit
e0d1c36e43
2 changed files with 6 additions and 2 deletions
|
|
@ -41,7 +41,9 @@ UINT_T CAT(capn_get,SZ) (LIST_T l, int off) {
|
|||
|
||||
int CAT(capn_getv,SZ) (LIST_T l, int off, UINT_T *to, int sz) {
|
||||
int i;
|
||||
capn_ptr p = l.p;
|
||||
capn_ptr p;
|
||||
capn_resolve(&l.p);
|
||||
p = l.p;
|
||||
if (off + sz > p.len) {
|
||||
sz = p.len - off;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -898,7 +898,9 @@ int capn_set1(capn_list1 l, int off, int val) {
|
|||
int capn_getv1(capn_list1 l, int off, uint8_t *data, int sz) {
|
||||
/* Note we only support aligned reads */
|
||||
int bsz;
|
||||
capn_ptr p = l.p;
|
||||
capn_ptr p;
|
||||
capn_resolve(&l.p);
|
||||
p = l.p;
|
||||
if (p.type != CAPN_BIT_LIST || (off & 7) != 0)
|
||||
return -1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue