Runtime: Retain: fix missuse of static classifier leading to ever increasing offset.
authorEdouard Tisserant
Fri, 22 Jul 2022 12:14:52 +0200
changeset 3576 58c09e84c369
parent 3557 59158e360b8c
child 3577 6c7a7b22bec9
Runtime: Retain: fix missuse of static classifier leading to ever increasing offset.
targets/plc_debug.c
--- a/targets/plc_debug.c	Thu Jul 14 11:40:27 2022 +0200
+++ b/targets/plc_debug.c	Fri Jul 22 12:14:52 2022 +0200
@@ -140,7 +140,7 @@
     InitRetain();
     /* Iterate over all variables to fill debug buffer */
     if(CheckRetainBuffer()){
-        static unsigned int retain_offset = 0;
+        unsigned int retain_offset = 0;
         retain_list_collect_cursor = 0;
 
         /* iterate over retain list */
@@ -322,7 +322,7 @@
         LeaveDebugSection();
     }
 #endif
-    static unsigned int retain_offset = 0;
+    unsigned int retain_offset = 0;
     /* when not debugging, do only retain */
     retain_list_collect_cursor = 0;