On a Pico, v1.91, Creating an empty array with new Float32Array() or Float64Array() hangs up Espruino.
Passing "0" as argument has the same effect.
Passing a not empty array as argument works as expected: new Float32Array(). Creating other arrays of size 0 (Uint8 etc.) also works.
Is this a (small) bug?
Wow - sounds like a bug - I'm amazed that's never come up before!
I'll take a look on Monday, and I should be able to get a fix in for 1v92.
Ok, this is now fixed and will be in 1v92 - it turned out to be a problem with converting them to a JSON-formatted string (so their use in normal execution would have been fine).
Great! Looking forward to 1v92..
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem