Page 1 of 1

Array initialiser out of bounds - crash

Posted: Thu Aug 24, 2023 7:17 pm
by mnfisher
So - create a simple array a[3] of bytes (size and type probably irrelevant)

Initialiser of {1,2,3} works perfectly.

Unfortunately so does {1,2,3,4} - however this causes bad things to happen - saving and reloading locks Flowcode.
Adding a macro Test(array) - passing the array closes FC on debug - but gives an error (array index out of bounds) or crashes on adding the call to Test.

Note that it only allows 1 extra byte (or value) - so {1,2,3,4,5} gives initialiser error.

I miscounted and pasted a chunk of data....
Array.fcfx
(7.63 KiB) Downloaded 45 times
Martin

Re: Array initialiser out of bounds - crash

Posted: Fri Aug 25, 2023 9:19 am
by Steve-Matrix
Thanks, Martin. I will add it to my list and fix in a future update.