You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • The first thing I noticed was you changed:

        buf.set(data, bufIdx);
        var idx = bufIdx+data.indexOf("\1");
        bufIdx += data.length;
    

    to

        buf.set(data, bufIdx);
        bufIdx += data.length;
        
        if (data.indexOf("\1") >= 0) {
          var idx = bufIdx + data.indexOf("\1");
    

    Obviously that's going to change the value of idx, so is a good place to start :)

About

Avatar for Gordon @Gordon started