Fix typo in plc_debug.c
authorEdouqrd Tisserant <edouard.tisserant@gmail.com>
Fri, 25 Mar 2011 17:43:40 +0100
changeset 582 bb5d0367bf32
parent 581 57605e8e89f0
child 583 8eff490f83fc
child 585 58977fe8b3b0
Fix typo in plc_debug.c
targets/plc_debug.c
--- a/targets/plc_debug.c	Wed Mar 16 18:01:07 2011 +0100
+++ b/targets/plc_debug.c	Fri Mar 25 17:43:40 2011 +0100
@@ -240,9 +240,10 @@
             break;\
         case TYPENAME##_O_ENUM :\
             ((__IEC_##TYPENAME##_p *)varp)->flags |= flags;\
-            if(force)\
+            if(force){\
              ((__IEC_##TYPENAME##_p *)varp)->fvalue = *((TYPENAME *)force);\
              *(((__IEC_##TYPENAME##_p *)varp)->value) = *((TYPENAME *)force);\
+            }\
             break;
 void RegisterDebugVariable(int idx, void* force)
 {
@@ -263,6 +264,7 @@
 
 #define __ResetDebugVariablesIterator_case_p(TYPENAME)\
         case TYPENAME##_P_ENUM :\
+        case TYPENAME##_O_ENUM :\
             ((__IEC_##TYPENAME##_p *)varp)->flags &= ~(__IEC_DEBUG_FLAG|__IEC_FORCE_FLAG);\
             break;