There is a risk of an out-of-bounds error ocurring here because of the "+1"
This flaw could lead to a DOS attack where the contract is being made to not work by an attacker because you could have a situation where the extra addition of "1" could exceed the set number of beneficiaries of the inheritance
Manual review
This code
```
can be re-written as the code below.
the code below has the following benefits;
The removal of "+1" will prevent an out-of-bounds error
There is a pre-check of "isInherited" to check if its truly false
The use of require makes makes the code gas-efficient and more readable
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.