Update rfb.js

This commit is contained in:
gongym 2020-07-20 14:21:29 +08:00 committed by GitHub
parent d952c6960b
commit 1bbcb188ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -493,8 +493,8 @@ export default class RFB extends EventTargetMixin {
for (let i = 0; i < text.length; i++) {
// FIXME: text can have values outside of Latin1/Uint8
let idx = text.charCodeAt(i);
data[i] = idx & 0xff;
data[i + 1] = idx >> 8;
data[i * 2] = idx & 0xff;
data[i * 2 + 1] = idx >> 8;
}
RFB.messages.clientCutText(this._sock, data);