Array initialiser out of bounds - crash
Posted: Thu Aug 24, 2023 7:17 pm
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....
Martin
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....
Martin