Fix index overflow issue in examples

In both receiveEvent and requestEvent, reg_position overflows one unit early due to a greater-than-or-equal comparison with reg_size_lessone. The solution is either to retain the comparison operator but eliminate reg_size_lessone, or to change the comparison to greater-than and retain reg_size_lessone. I have chosen to eliminate reg_size_lessone, as it is clumsy to store a (variable - 1) in a separate variable.