--- a/targets/plc_debug.c Wed Dec 09 16:51:22 2009 +0100
+++ b/targets/plc_debug.c Wed Dec 09 16:52:46 2009 +0100
@@ -65,7 +65,10 @@
#define __BufferDebugDataIterator_case_p(TYPENAME)\
case TYPENAME##_P_ENUM :\
*flags = ((__IEC_##TYPENAME##_p *)varp)->flags;\
- *ptrvalue = ((__IEC_##TYPENAME##_p *)varp)->value;\
+ if (*flags && __IEC_FORCE_FLAG)\
+ *ptrvalue = &((__IEC_##TYPENAME##_p *)varp)->fvalue;\
+ else\
+ *ptrvalue = ((__IEC_##TYPENAME##_p *)varp)->value;\
break;
void UnpackVar(void* varp, __IEC_types_enum vartype, void **ptrvalue, char *flags)