# HG changeset patch
# User laurent
# Date 1253102456 -7200
# Node ID 5371e3d32f051a2178f95f0d605e591893d9ce8e
# Parent  af20e07e53c57a5c837bfd11dc2a5ae50a4cf5e3
Bug on debug buffer test resulting in not transmitting debug data under specific conditions fixed

diff -r af20e07e53c5 -r 5371e3d32f05 targets/plc_debug.c
--- 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 buffer not full */
-                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);