Fixed typo in copy_to_log
authorEdouard Tisserant
Fri, 22 Mar 2013 11:02:56 +0900
changeset 996 17d9c81b5ed8
parent 995 5dcb361a55ef
child 998 2f7721dae9a0
Fixed typo in copy_to_log
targets/plc_main_tail.c
--- a/targets/plc_main_tail.c	Fri Mar 22 10:40:28 2013 +0900
+++ b/targets/plc_main_tail.c	Fri Mar 22 11:02:56 2013 +0900
@@ -26,7 +26,7 @@
     if(buffpos + size < LOG_BUFFER_SIZE){
         memcpy(&LogBuff[level][buffpos], buf, size);
     }else{
-        uint32_t remaining = LOG_BUFFER_SIZE - buffpos - 1; 
+        uint32_t remaining = LOG_BUFFER_SIZE - buffpos; 
         memcpy(&LogBuff[level][buffpos], buf, remaining);
         memcpy(LogBuff[level], (char*)buf + remaining, size - remaining);
     }