Fix crash on accessing past-the-end of a vector
Merge pull request #200 from AMDmi3/crash-fix

Fix crash on accessing past-the-end of a vector