targets/plc_debug.c
changeset 235 a66e150f2888
parent 209 08dc3d064cb5
child 236 a32817e81f5e
--- a/targets/plc_debug.c	Tue Sep 02 12:24:25 2008 +0200
+++ b/targets/plc_debug.c	Wed Sep 03 17:28:17 2008 +0200
@@ -136,13 +136,14 @@
         &buffer_state,
         BUFFER_BUSY,
         BUFFER_FREE);
+    subscription_cursor = subscription_table;
 }
 
 void* IterDebugData(int* idx, const char **type_name)
 {
     if(subscription_cursor < latest_subscription){
         *idx = *subscription_cursor;
-        struct_plcvar* my_var = &variable_table[*subscription_cursor++];
+        struct_plcvar* my_var = &variable_table[*(subscription_cursor++)];
         *type_name = __get_type_enum_name(my_var->type);
         return my_var->ptrvalue;
     }