From ea3c4a47f227010ae2d69c1d0bb2ba5877c068f3 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Tue, 18 Apr 2017 18:05:36 -0400 Subject: [PATCH] Fix `while` condition, disable eslint complaint --- src/ADPCMSoundDecoder.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ADPCMSoundDecoder.js b/src/ADPCMSoundDecoder.js index b8198e5..e9e0b00 100644 --- a/src/ADPCMSoundDecoder.js +++ b/src/ADPCMSoundDecoder.js @@ -129,8 +129,9 @@ class ADPCMSoundDecoder { if (!compressedData) return out; compressedData.position = 0; - const a = 0; - while (a === 0) { + + // @todo Update this loop ported from Scratch 2.0 to use a condition or a for loop. + while (true) { // eslint-disable-line no-constant-condition if (((compressedData.position % blockSize) === 0) && (lastByte < 0)) { // read block header if (compressedData.getBytesAvailable() === 0) break; sample = compressedData.readInt16();