Skip to content

Commit

Permalink
perf: use while instead
Browse files Browse the repository at this point in the history
  • Loading branch information
eidoriantan committed Aug 10, 2024
1 parent e17ab0d commit e13b1fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/viewer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default class BufferView extends DataView {
}

getUint16 (offset, length = 2, le = false) {
if (length % 2 !== 0) length -= 1
while (length % 2 !== 0) length -= 1
const limit = offset + length
const bytes = []

Expand Down

0 comments on commit e13b1fc

Please sign in to comment.