Skip to content

Commit 6b52729

Browse files
committed
Fix sonar
1 parent 4fcad77 commit 6b52729

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/msp.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ const MSP = {
381381

382382
// Create a simple hash of the data
383383
let hash = 0;
384-
for (let i = 0; i < data.length; i++) {
385-
hash = ((hash << 5) - hash + data[i]) & 0xffffffff;
384+
for (const byte of data) {
385+
hash = ((hash << 5) - hash + byte) & 0xffffffff;
386386
}
387387

388388
return `${code}:${hash}`;

0 commit comments

Comments
 (0)