Skip to content

Commit cb7f35e

Browse files
Andrii MorozAndrii Moroz
Andrii Moroz
authored and
Andrii Moroz
committed
Fixed huge keys values sending
1 parent f48eae8 commit cb7f35e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vnc/vncclient.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,10 @@ void VNCClient::sendKeyEvent(QKeyEvent *key)
503503

504504
quint32 keyValue = convertQtKeyToX11Key(key);
505505
char value[4];
506-
value[0] = (char)(keyValue&0xff000000)>>24;
507-
value[1] = (char)(keyValue&0x00ff0000)>>16;
508-
value[2] = (char)(keyValue&0x0000ff00)>>8;
509-
value[3] = (char)keyValue&0x000000ff;
506+
value[0] = (char)((keyValue&0xff000000)>>24);
507+
value[1] = (char)((keyValue&0x00ff0000)>>16);
508+
value[2] = (char)((keyValue&0x0000ff00)>>8);
509+
value[3] = (char)(keyValue&0x000000ff);
510510
keyMsg.insert(4, value[0]);
511511
keyMsg.insert(5, value[1]);
512512
keyMsg.insert(6, value[2]);

0 commit comments

Comments
 (0)