@colyseus/schema 3.0.0-alpha.3 → 3.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1010,7 +1010,6 @@ const encodeArray = function (encoder, bytes, changeTree, field, operation, it,
1010
1010
  * SOFTWARE
1011
1011
  */
1012
1012
  function utf8Read(bytes, it, length) {
1013
- it.offset += length;
1014
1013
  var string = '', chr = 0;
1015
1014
  for (var i = it.offset, end = it.offset + length; i < end; i++) {
1016
1015
  var byte = bytes[i];
@@ -1047,6 +1046,7 @@ function utf8Read(bytes, it, length) {
1047
1046
  // (do not throw error to avoid server/client from crashing due to hack attemps)
1048
1047
  // throw new Error('Invalid byte ' + byte.toString(16));
1049
1048
  }
1049
+ it.offset += length;
1050
1050
  return string;
1051
1051
  }
1052
1052
  function int8(bytes, it) {