I created a TwinCAT program with negative indices ARRAY[-1..5] OF INT; and tried parsing the symbols from the program.
The library panicked for reason "attempt to add with overflow" in line 258 of symbol.rs.
Stack trace looks something like this:
0: std::panicking::begin_panic_handler
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:584
1: core::panicking::panic_fmt
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\panicking.rs:142
2: core::panicking::panic
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\panicking.rs:48
3: ads::symbol::decode_symbol_info::decode_type_info
at C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\ads-0.4.3\src\symbol.rs:258
4: ads::symbol::decode_symbol_info
at C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\ads-0.4.3\src\symbol.rs:296
5: ads::symbol::get_symbol_info
at C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\ads-0.4.3\src\symbol.rs:213
I created a TwinCAT program with negative indices
ARRAY[-1..5] OF INT;
and tried parsing the symbols from the program.The library panicked for reason "attempt to add with overflow" in line 258 of symbol.rs.
Stack trace looks something like this: