1
0
mirror of https://github.com/4yn/slidershim.git synced 2025-02-25 22:08:47 +01:00

brokenithm off by one

This commit is contained in:
4yn 2022-03-16 19:11:40 +08:00
parent ec1a146449
commit bcff45da56

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,