protobufjs 8.4.1 → 8.4.2

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * protobuf.js v8.4.1 (c) 2016, daniel wirtz
3
- * compiled thu, 21 may 2026 18:52:08 utc
2
+ * protobuf.js v8.4.2 (c) 2016, daniel wirtz
3
+ * compiled fri, 22 may 2026 02:44:15 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */
@@ -2040,7 +2040,7 @@ Namespace.arrayToJSON = arrayToJSON;
2040
2040
  Namespace.isReservedId = function isReservedId(reserved, id) {
2041
2041
  if (reserved)
2042
2042
  for (var i = 0; i < reserved.length; ++i)
2043
- if (typeof reserved[i] !== "string" && reserved[i][0] <= id && reserved[i][1] > id)
2043
+ if (typeof reserved[i] !== "string" && reserved[i][0] <= id && reserved[i][1] >= id)
2044
2044
  return true;
2045
2045
  return false;
2046
2046
  };
@@ -8062,7 +8062,7 @@ Writer.prototype.uint32 = function write_uint32(value) {
8062
8062
  * @returns {Writer} `this`
8063
8063
  */
8064
8064
  Writer.prototype.int32 = function write_int32(value) {
8065
- return value < 0
8065
+ return (value |= 0) < 0
8066
8066
  ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec
8067
8067
  : this.uint32(value);
8068
8068
  };
@@ -8077,16 +8077,18 @@ Writer.prototype.sint32 = function write_sint32(value) {
8077
8077
  };
8078
8078
 
8079
8079
  function writeVarint64(val, buf, pos) {
8080
- while (val.hi) {
8081
- buf[pos++] = val.lo & 127 | 128;
8082
- val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;
8083
- val.hi >>>= 7;
8084
- }
8085
- while (val.lo > 127) {
8086
- buf[pos++] = val.lo & 127 | 128;
8087
- val.lo = val.lo >>> 7;
8088
- }
8089
- buf[pos++] = val.lo;
8080
+ var lo = val.lo,
8081
+ hi = val.hi;
8082
+ while (hi) {
8083
+ buf[pos++] = lo & 127 | 128;
8084
+ lo = (lo >>> 7 | hi << 25) >>> 0;
8085
+ hi >>>= 7;
8086
+ }
8087
+ while (lo > 127) {
8088
+ buf[pos++] = lo & 127 | 128;
8089
+ lo = lo >>> 7;
8090
+ }
8091
+ buf[pos++] = lo;
8090
8092
  }
8091
8093
 
8092
8094
  /**