summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/shared/dlt_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/dlt_common.c b/src/shared/dlt_common.c
index 69d601b..1da96f0 100755
--- a/src/shared/dlt_common.c
+++ b/src/shared/dlt_common.c
@@ -2199,7 +2199,7 @@ int dlt_receiver_remove(DltReceiver *receiver,int size)
return -1;
}
- if (size>receiver->bytesRcvd)
+ if (size > receiver->bytesRcvd || size <= 0)
{
receiver->buf = receiver->buf + receiver->bytesRcvd;
receiver->bytesRcvd=0;