accessoryservices/accessoryserver/src/ChargerContext/ChargingContextFSMBody.cpp
branchRCL_3
changeset 5 1a73e8f1b64d
parent 0 4e1aa6a622a0
--- a/accessoryservices/accessoryserver/src/ChargerContext/ChargingContextFSMBody.cpp	Sat Feb 20 00:05:00 2010 +0200
+++ b/accessoryservices/accessoryserver/src/ChargerContext/ChargingContextFSMBody.cpp	Fri Mar 12 15:50:01 2010 +0200
@@ -78,7 +78,7 @@
             }
         }
     // Delete state objects
-    for (TInt i = 1; i <= EChargerContextStateMaxValue; i++ )
+    for (TInt i = 1; i < EChargerContextStateMaxValue; i++ )
         {
         delete iStateArray[i];
         iStateArray[i] = NULL;
@@ -111,7 +111,7 @@
     COM_TRACE_( "[AccFW:AccServer] CChargingContextFSMBody::Transit()" );
     TBool retVal(EFalse);
     if ( ( EChargerContextStateUndefined < aNextState ) && 
-         (  EChargerContextStateMaxValue >= aNextState ) )
+         (  EChargerContextStateMaxValue > aNextState ) )
         {
         iCurrentStateId = aNextState;
         if ( NULL != iStateArray[iCurrentStateId])
@@ -173,7 +173,7 @@
     COM_TRACE_( "[AccFW:AccServer] CChargingContextFSMBody::CurrentState()" );
     MFSMState* currentState( NULL );
     if ( ( EChargerContextStateUndefined < iCurrentStateId ) && 
-            ( EChargerContextStateMaxValue >= iCurrentStateId ))
+            ( EChargerContextStateMaxValue > iCurrentStateId ))
         {
         currentState = iStateArray[iCurrentStateId];
         }
@@ -191,7 +191,7 @@
     TPtrC currentStateName;
     currentStateName.Set( KNullDesC );
     if ( ( EChargerContextStateUndefined < iCurrentStateId ) && 
-         ( EChargerContextStateMaxValue >= iCurrentStateId ))
+         ( EChargerContextStateMaxValue > iCurrentStateId ))
         {
         currentStateName.Set( iStateArray[iCurrentStateId]->Name() );
         }