StefanSalewski / rust-chess

Port of salewski-chess from Nim to Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stupid error in fn much_faster_write_to_bit_buffer()

StefanSalewski opened this issue · comments

Of course it should be

collector[bpos..(bpos + 8)].copy_from_slice(&buf.to_le_bytes()[0..8]);

in both cases. Because buf is 8 byte in size, not 4 :-)

That error lead to errors and sometimes gave crashes, as movelist matched not the board content. We should fix this issue soon.