brokenithm off by one

pull/13/head
4yn 2022-03-16 19:11:40 +08:00
parent ec1a146449
commit bcff45da56
1 changed files with 2 additions and 2 deletions

View File

@ -115,13 +115,13 @@ async fn handle_brokenithm(
39 => {
if chars[0] == 'b' {
let mut input_handle = state_handle.input.lock();
for (idx, c) in chars[0..32].iter().enumerate() {
for (idx, c) in chars[1..33].iter().enumerate() {
input_handle.ground[idx] = match *c == '1' {
false => 0,
true => 255,
}
}
for (idx, c) in chars[32..38].iter().enumerate() {
for (idx, c) in chars[33..39].iter().enumerate() {
input_handle.air[idx] = match *c == '1' {
false => 0,
true => 1,