file-type 16.5.3 → 16.5.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.
Files changed (2) hide show
  1. package/core.js +1 -1
  2. package/package.json +1 -1
package/core.js CHANGED
@@ -681,7 +681,7 @@ async function _fromTokenizer(tokenizer) {
681
681
  let mask = 0x80;
682
682
  let ic = 0; // 0 = A, 1 = B, 2 = C, 3 = D
683
683
 
684
- while ((msb & mask) === 0) {
684
+ while ((msb & mask) === 0 && mask !== 0) {
685
685
  ++ic;
686
686
  mask >>= 1;
687
687
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "file-type",
3
- "version": "16.5.3",
3
+ "version": "16.5.4",
4
4
  "description": "Detect the file type of a Buffer/Uint8Array/ArrayBuffer",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/file-type",