Skip to content

Commit ce8f4c6

Browse files
committed
Update the total_read field when sending an in memory buffer, and use the total_read to index into the array on subsequent calls.
1 parent 950c0fc commit ce8f4c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ds3.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ static size_t _ds3_send_xml_buff(void* buffer, size_t size, size_t nmemb, void*
119119
to_read = remaining;
120120
}
121121

122-
strncpy((char*)buffer, xml_buff->buff, to_read);
122+
strncpy((char*)buffer, xml_buff->buff + xml_buff->total_read, to_read);
123+
xml_buff->total_read += to_read;
123124
return to_read;
124125
}
125126

0 commit comments

Comments
 (0)