Update rfb.js

This commit is contained in:
gongym 2020-07-20 14:10:39 +08:00 committed by GitHub
parent 3f4d59ba4c
commit d952c6960b
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.push(idx & 0xff);
data.push(idx >> 8);
data[i] = idx & 0xff;
data[i + 1] = idx >> 8;
}
RFB.messages.clientCutText(this._sock, data);