Skip to content

Commit 2a2c1a9

Browse files
author
andy-ms
committed
Add comment
1 parent ac67b94 commit 2a2c1a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/sys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ namespace ts {
202202
if (len >= 2 && buffer[0] === 0xFE && buffer[1] === 0xFF) {
203203
// Big endian UTF-16 byte order mark detected. Since big endian is not supported by node.js,
204204
// flip all byte pairs and treat as little endian.
205-
len &= ~1;
205+
len &= ~1; // Round down to a multiple of 2
206206
for (let i = 0; i < len; i += 2) {
207207
const temp = buffer[i];
208208
buffer[i] = buffer[i + 1];

0 commit comments

Comments
 (0)