fixed bug with NREA buffer init;
This commit is contained in:
parent
8c46b58783
commit
8ddcddf18f
3
ndbuf.c
3
ndbuf.c
@ -78,7 +78,8 @@ ndbuf_t *ndbuf_new_frombuf(char *buf, size_t buf_len, void (*freebuf)(char *))
|
||||
|
||||
/* init buffer */
|
||||
b->raw = buf;
|
||||
b->rlength = b->ulength = buf_len;
|
||||
b->rlength = buf_len;
|
||||
b->ulength = 0; /* assume it's not used */
|
||||
b->flags = b->curr = 0;
|
||||
b->freebuf = freebuf;
|
||||
b->flags |= NDBUF_NREA;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user