devicescript
devicescript copied to clipboard
DeviceScript wrongly considers a loop as an infinite one.
Describe the bug
DeviceScript panics, saying Exception: InfiniteLoop
wrongly
To Reproduce
- create two random buffers, one of the size of 4500-5000 and the other with the size of 4
- loop over the big buffer, running
bigBuffer[i] ^= smallBuffer[i % 4]
in it - see error
Expected behavior The loop runs and finishes successfully.
Screenshots
Additional context I'm running through the devicescript simulator, experienced while creating a websocket library for devicescript. The loop is needed for masking the message.