We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac67b94 commit 2a2c1a9Copy full SHA for 2a2c1a9
src/compiler/sys.ts
@@ -202,7 +202,7 @@ namespace ts {
202
if (len >= 2 && buffer[0] === 0xFE && buffer[1] === 0xFF) {
203
// Big endian UTF-16 byte order mark detected. Since big endian is not supported by node.js,
204
// flip all byte pairs and treat as little endian.
205
- len &= ~1;
+ len &= ~1; // Round down to a multiple of 2
206
for (let i = 0; i < len; i += 2) {
207
const temp = buffer[i];
208
buffer[i] = buffer[i + 1];
0 commit comments