targets/plc_debug.c
changeset 1074 92a009dc5826
parent 985 cd8dadcef426
child 1403 dd6d40094782
--- a/targets/plc_debug.c	Fri Apr 26 23:08:41 2013 +0900
+++ b/targets/plc_debug.c	Sun Apr 28 17:26:22 2013 +0900
@@ -152,6 +152,10 @@
                 /* compute next cursor positon.
                    No need to check overflow, as BUFFER_SIZE
                    is computed large enough */
+                if(vartype == STRING_ENUM){
+                    /* optimization for strings */
+                    size = ((STRING*)visible_value_p)->len + 1;
+                }
                 char* next_cursor = buffer_cursor + size;
                 /* copy data to the buffer */
                 memcpy(buffer_cursor, visible_value_p, size);