This commit is contained in:
Luca 2016-10-20 15:21:29 +02:00 committed by GitHub
parent 47d2845861
commit 3be652a0e0
1 changed files with 2 additions and 2 deletions

View File

@ -860,7 +860,7 @@ uint16 ecx_statecheck(ecx_contextt *context, uint16 slave, uint16 reqstate, int
if((rval & 0xf0) == 0)
{
/* No slave has toggled the error flag so the alstatuscode (even if different from 0) should be ignored */
for(slaveindex = 0; slaveindex < *(context->slavecount); slaveindex++)
for(slaveindex = 1; slaveindex <= *(context->slavecount); slaveindex++)
{
context->slavelist[slaveindex].ALstatuscode = 0x0000;
}
@ -874,7 +874,7 @@ uint16 ecx_statecheck(ecx_contextt *context, uint16 slave, uint16 reqstate, int
case EC_STATE_SAFE_OP:
case EC_STATE_OPERATIONAL:
/* All the slaves have reached the same state so we can update the state of every slave */
for(slaveindex = 0; slaveindex < *(context->slavecount); slaveindex++)
for(slaveindex = 1; slaveindex <= *(context->slavecount); slaveindex++)
{
context->slavelist[slaveindex].state = bitwisestate;
}