From 48da61421c20654bf7d7b36407e9d62a4fb676d8 Mon Sep 17 00:00:00 2001 From: koennecke Date: Thu, 3 Mar 2005 13:55:16 +0000 Subject: [PATCH] - Fixed SerPortServer for SL --- utils/SerPortServer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/SerPortServer.c b/utils/SerPortServer.c index 748a86b..3495163 100755 --- a/utils/SerPortServer.c +++ b/utils/SerPortServer.c @@ -1158,7 +1158,9 @@ static int RS__MAX_ASYNCH = 20; /* Asynch "ports" 0 - 19 will be allowed */ Cl_info[i].remaining -= bytes_got; Cl_info[i].nxt_rply_ptr1 += bytes_got; - memcpy (Ts_info[indx].tp_ahd, &rcve[bytes_got], (j - bytes_got)); + if( (j - bytes_got) > 0){ + memcpy (Ts_info[indx].tp_ahd, &rcve[bytes_got], (j - bytes_got)); + } Ts_info[indx].tp_nxt = j - bytes_got; } if (term_fnd) { /* Response complete? */