ckcr4lyf / kiryuu

A highly performant HTTP bittorrent tracker (WIP)
Do What The F*ck You Want To Public License
13 stars 3 forks source link

panicked at src/byte_functions/mod.rs:41:17 #51

Open ckcr4lyf opened 2 months ago

ckcr4lyf commented 2 months ago

Also happens at 57:17.

Logs:

thread 'actix-rt|system:0|arbiter:0' panicked at src/byte_functions/mod.rs:57:17:
index out of bounds: the len is 40 but the index is 40
thread 'actix-rt|system:0|arbiter:0' panicked at src/byte_functions/mod.rs:41:17:
index out of bounds: the len is 40 but the index is 40

Code:

https://github.com/ckcr4lyf/kiryuu/blob/de06f1e4fec93ffc27bdc255b7131d652fbb0c5f/src/byte_functions/mod.rs#L40-L45

https://github.com/ckcr4lyf/kiryuu/blob/de06f1e4fec93ffc27bdc255b7131d652fbb0c5f/src/byte_functions/mod.rs#L56-L60

Should fix it probably...