Store the number of bytes read for the line
This commit is contained in:
parent
93ff826f67
commit
ec2da2168b
|
@ -74,6 +74,7 @@ static struct line_read_result read_line(const char *buffer, int buffer_size, st
|
|||
result.line = malloc((line_size + 1) * sizeof(char));
|
||||
memcpy(result.line, buffer, line_size);
|
||||
result.line[line_size] = '\0';
|
||||
result.bytes_read = line_size;
|
||||
if (result.line_type == RESULT_START_LINE) {
|
||||
message->start_line = malloc((line_size + 1) * sizeof(char));
|
||||
strcpy(message->start_line, result.line);
|
||||
|
|
Loading…
Reference in a new issue