review feedback: fix some index-mismatch bugs pointed out by arielb1.
review feedback: fix some index-mismatch bugs pointed out by arielb1.

graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust