Open assaf758 opened 7 years ago
this seems to fix it for me, not sure its the right approach
@@ -1026,7 +1026,11 @@ capn_ptr capn_new_list(struct capn_segment *seg, int sz, int datasz, int ptrs) {
new_object(&p, p.len * 4);
} else {
p.datasz = datasz;
- new_object(&p, p.len * datasz);
+ if (p.len > 0) {
+ new_object(&p, p.len * datasz);
+ } else {
+ new_object(&p, 1);
+ }
}
return p;
The generated .c file for the below capnp does not compile due to undeclared capn_buf:
File Test.capnp: