core: stream: b_stream_read_line_s now includes linefeed in output and correctly reports EOF condition

This commit is contained in:
2025-09-22 10:32:37 +01:00
parent bc5986150c
commit cbaeb002f8

View File

@@ -386,14 +386,19 @@ enum b_status b_stream_read_line_s(struct b_stream *src, b_stream *dest)
break;
}
b_stream_write_char(dest, c);
i++;
if (c == '\n') {
break;
}
b_stream_write_char(dest, c);
}
return B_SUCCESS;
if (status == B_ERR_NO_DATA && i > 0) {
status = B_SUCCESS;
}
return status;
}
enum b_status b_stream_read_all_bytes(