@DrAzzy, would below code fix the issue - if there ever was any (because the .substr() would not have not concatenated more to t than would have been left from the last piece of data - would it)?
while (l > 0) {
i=((i = this.pgsz-(add%this.pgsz)) > l) ? l : i;
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@DrAzzy, would below code fix the issue - if there ever was any (because the .substr() would not have not concatenated more to t than would have been left from the last piece of data - would it)?