--- a/targets/plc_debug.c Wed Sep 16 13:54:57 2009 +0200
+++ b/targets/plc_debug.c Wed Sep 16 14:00:56 2009 +0200
@@ -102,7 +102,7 @@
/* compute next cursor positon*/
next_cursor = buffer_cursor + size;
- if(next_cursor < debug_buffer + BUFFER_SIZE)
+ if(next_cursor <= debug_buffer + BUFFER_SIZE) /* copy data to the buffer */
memcpy(buffer_cursor, my_var->ptrvalue, size);