squishjs 0.7.52 → 0.7.53

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/squish.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squishjs",
3
- "version": "0.7.52",
3
+ "version": "0.7.53",
4
4
  "description": "squish & unsquish stuff",
5
5
  "scripts": {
6
6
  "test": "node testRunner.js"
package/src/squish.js CHANGED
@@ -131,9 +131,9 @@ const squish = (entity, scale = null) => {
131
131
 
132
132
  // length + 5 bytes for what we're inserting here - 3 for length, one for type (3), one for class code
133
133
  const totalLength = squished.length + 5;
134
- const rightMost = Math.min(256, totalLength);
135
- const middle = Math.min(256, Math.max(0, totalLength - 256));
136
- const leftMost = Math.min(256, Math.max(0, totalLength - 512));
134
+ const rightMost = Math.min(255, totalLength);
135
+ const middle = Math.min(255, Math.max(0, totalLength - 255));
136
+ const leftMost = Math.min(255, Math.max(0, totalLength - 510));
137
137
 
138
138
  return [3, leftMost, middle, rightMost, nodeClassCode, ...squished];
139
139