Skip to content

Commit 697b5af

Browse files
committed
Fix byteswritten check on Windows
1 parent 16cb900 commit 697b5af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transport/hid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export class HID implements Transport {
122122
}
123123

124124
const bytesWritten = this.device.write(array);
125-
if (bytesWritten !== this.packetSize) return reject("Incorrect bytecount written");
125+
if (bytesWritten !== array.length) return reject("Incorrect bytecount written");
126126

127127
resolve();
128128
});

0 commit comments

Comments
 (0)