Bugfix: when initializing buffer from data reset position afterwards
This commit is contained in:
parent
fb938637cc
commit
3bd6a7d3e7
1 changed files with 1 additions and 0 deletions
|
@ -143,6 +143,7 @@ static inline Buffer *buffer_from_data_no_copy(char *data, size_t len) {
|
|||
static inline Buffer *buffer_from_data_copy(char *data, size_t len) {
|
||||
Buffer *buffer = buffer_allocate(len);
|
||||
(void)buffer_copy_in(data, buffer, len);
|
||||
buffer->position = 0;
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue