From 5203b3cea79a3f6543f1ddfc29556a29bd0f2818 Mon Sep 17 00:00:00 2001 From: Matthias Larisch Date: Mon, 9 Jun 2025 13:49:02 +0200 Subject: [PATCH] Example read stream method returns number of bytes read The example code for continuous streams does now return the number of bytes read. --- docs/node.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/node.md b/docs/node.md index 29d7cbd..302fe93 100644 --- a/docs/node.md +++ b/docs/node.md @@ -55,6 +55,7 @@ static size_t read_stream(mpack_tree_t* tree, char* buffer, size_t count) { ssize_t step = read(stream->fd, buffer, count); if (step <= 0) mpack_tree_flag_error(tree, mpack_error_io); + return step; } void parse_stream(stream_t* stream) {