aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/src')
-rw-r--r--os/hal/src/hal_buffers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/hal/src/hal_buffers.c b/os/hal/src/hal_buffers.c
index 2f4e0339c..e89147c9a 100644
--- a/os/hal/src/hal_buffers.c
+++ b/os/hal/src/hal_buffers.c
@@ -855,7 +855,7 @@ void obqFlush(output_buffers_queue_t *obqp) {
/* If there is a buffer partially filled and not being written.*/
if (obqp->ptr != NULL) {
- size_t size = (size_t)obqp->ptr - (size_t)obqp->bwrptr;
+ size_t size = (size_t)obqp->ptr - (size_t)obqp->bwrptr - sizeof (size_t);
if (size > 0U) {
obqPostFullBufferS(obqp, size);