[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websock API cleanup #1782

Merged
merged 18 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Return unsigned values from rQshift32()
This is what we almost always want, and this makes it consistent with
rQshift8() and rQshift16().
  • Loading branch information
CendioOssman committed Jun 4, 2023
commit 0ccc679d322947a05f2fc169da22d915930a75a6
2 changes: 2 additions & 0 deletions core/rfb.js
Original file line number Diff line number Diff line change
Expand Up @@ -2491,6 +2491,8 @@ export default class RFB extends EventTargetMixin {
this._FBU.width = this._sock.rQshift16();
this._FBU.height = this._sock.rQshift16();
this._FBU.encoding = this._sock.rQshift32();
/* Encodings are signed */
this._FBU.encoding >>= 0;
}

if (!this._handleRect()) {
Expand Down
2 changes: 1 addition & 1 deletion core/websock.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default class Websock {
for (let byte = bytes - 1; byte >= 0; byte--) {
res += this._rQ[this._rQi++] << (byte * 8);
}
return res;
return res >>> 0;
}

rQshiftStr(len) {
Expand Down