fltk-rs/fl2rust

index out of bounds: the len is 10 but the index is 18446744073709551615

1sra3l opened this issue · 8 comments

for i in 0..props.len() {

I think it shoule be

for i in 1..props.len() {
// since you use props[i - 1]

Hi
Do you have a reproducer which invokes this?

I've pushed a fix which uses optionals and wrapping sub.

@MoAlyousef it is still happenening unless I modify to 0 to 1 again.
I have tried both using a manual version fl2rust in.fl > out.rs as well as manually editing my installed version and deleting my deps to rebuild the changes.

This is by far the most intricate FLUID file I have ever used with the program, it is 1247 lines, otherwise I'd post it here.
If the 0 should work (like it used to) it seems there is likely some item I am using you did not include, or something along those lines.

Though, if you just want me to post it anyhow I can 😄

Does it also happen with the latest changes?
If you could upload it or send it privately, it would provide a good test case.

I've tried the latest changes on the file you sent me and it seems to work correctly. Can you try again?

Were you able to verify the latest release?

This does indeed fix it! Thanks so much I will close this!