Fix an off-by-one error in the example code.
PR: docs/55445 Submitted by: Rui Lopes <rui@ruilopes.com> Approved by: des (mentor)