Runtime: Retain: fix missuse of static classifier leading to ever increasing offset.
--- 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;