@nxtedition/lib 28.0.28 → 28.0.29
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.
- package/package.json +2 -2
- package/shared.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxtedition/lib",
|
|
3
|
-
"version": "28.0.
|
|
3
|
+
"version": "28.0.29",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": "Robert Nagy <robert.nagy@boffins.se>",
|
|
6
6
|
"type": "module",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"canvas": "^3.1.0",
|
|
93
93
|
"rxjs": "^7.0.0"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "9a796e26b5fd7bf119919c756967597722decd67"
|
|
96
96
|
}
|
package/shared.js
CHANGED
|
@@ -94,6 +94,9 @@ export function reader({ sharedState, sharedBuffer }) {
|
|
|
94
94
|
// wrapped around to the beginning of the buffer.
|
|
95
95
|
if (dataLen === -1) {
|
|
96
96
|
readPos = 0
|
|
97
|
+
// After wrapping, we must re-check against the writer's position.
|
|
98
|
+
// It's possible the writer is now at a position > 0.
|
|
99
|
+
writePos = Atomics.load(state, WRITE_INDEX) | 0
|
|
97
100
|
} else {
|
|
98
101
|
if (dataLen < 0) {
|
|
99
102
|
throw new Error('Invalid data length')
|