fixed string indexing

Fixes `gl-rs` after a breaking rustc change to string indexing.