From 42c3fbad3d5b0797c1c576989063f22570cc69d1 Mon Sep 17 00:00:00 2001 From: Fabian Drinck Date: Sun, 18 Dec 2016 14:34:22 +0100 Subject: [PATCH] Fix off-by-one mistake in while loop explanation --- src/ch03-05-control-flow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch03-05-control-flow.md b/src/ch03-05-control-flow.md index e813bf4d4..f2e1d3584 100644 --- a/src/ch03-05-control-flow.md +++ b/src/ch03-05-control-flow.md @@ -383,7 +383,7 @@ the value is: 50 ``` All five array values appear in the terminal, as expected. Even though `index` -will reach a value of `6` at some point, the loop stops executing before trying +will reach a value of `5` at some point, the loop stops executing before trying to fetch a sixth value from the array. But this approach is error prone; we could cause the program to panic if the