From 752ec12261cf10155754534c3de8ea7bdfda5e54 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Thu, 19 Sep 2019 11:42:04 +0200 Subject: [PATCH] bugfix: memmove'ed to much --- modules/libcom/src/log/logClient.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/libcom/src/log/logClient.c b/modules/libcom/src/log/logClient.c index 28b933e02..4e647bd83 100644 --- a/modules/libcom/src/log/logClient.c +++ b/modules/libcom/src/log/logClient.c @@ -294,10 +294,10 @@ void epicsShareAPI logClientFlush ( logClientId id ) else if ( nSent > 0 && pClient->nextMsgIndex > 0 ) { pClient->backlog = epicsSocketCountUnsentBytes ( pClient->sock ); nSent -= pClient->backlog; - if ( nSent > 0 ) { + pClient->nextMsgIndex -= nSent; + if ( nSent > 0 && pClient->nextMsgIndex > 0 ) { memmove ( pClient->msgBuf, & pClient->msgBuf[nSent], pClient->nextMsgIndex ); - pClient->nextMsgIndex -= nSent; } } epicsMutexUnlock ( pClient->mutex );