}
if (state == MSGSTATE_RECT_HEADER) {
- if (!is->hasData(12))
+ if (!is->hasData(2 + 2 + 2 + 2 + 4))
return false;
int x = is->readU16();
bool CMsgReader::readSetColourMapEntries()
{
- if (!is->hasData(5))
+ if (!is->hasData(1 + 2 + 2))
return false;
is->setRestorePoint();
bool CMsgReader::readServerCutText()
{
- if (!is->hasData(7))
+ if (!is->hasData(3 + 4))
return false;
is->setRestorePoint();
rdr::U8 len;
char data[64];
- if (!is->hasData(8))
+ if (!is->hasData(3 + 4 + 1))
return false;
is->setRestorePoint();
bool CMsgReader::readFramebufferUpdate()
{
- if (!is->hasData(3))
+ if (!is->hasData(1 + 2))
return false;
is->skip(1);
rdr::U8 type;
- if (!is->hasData(2))
+ if (!is->hasData(1 + 1))
return false;
type = is->readU8();
int sx, sy, sw, sh;
ScreenSet layout;
- if (!is->hasData(4))
+ if (!is->hasData(1 + 3))
return false;
is->setRestorePoint();
bool SMsgReader::readSetEncodings()
{
- if (!is->hasData(3))
+ if (!is->hasData(1 + 2))
return false;
is->setRestorePoint();
int sx, sy, sw, sh;
ScreenSet layout;
- if (!is->hasData(7))
+ if (!is->hasData(1 + 2 + 2 + 1 + 1))
return true;
is->setRestorePoint();
screens = is->readU8();
is->skip(1);
- if (!is->hasDataOrRestore(screens * 24))
+ if (!is->hasDataOrRestore(screens * (4 + 2 + 2 + 2 + 2 + 4)))
return false;
is->clearRestorePoint();
bool SMsgReader::readFramebufferUpdateRequest()
{
- if (!is->hasData(17))
+ if (!is->hasData(1 + 2 + 2 + 2 + 2))
return false;
bool inc = is->readU8();
int x = is->readU16();
bool enable;
int x, y, w, h;
- if (!is->hasData(17))
+ if (!is->hasData(1 + 2 + 2 + 2 + 2))
return false;
enable = is->readU8();
rdr::U8 len;
char data[64];
- if (!is->hasData(8))
+ if (!is->hasData(3 + 4 + 1))
return false;
is->setRestorePoint();
bool SMsgReader::readKeyEvent()
{
- if (!is->hasData(7))
+ if (!is->hasData(1 + 2 + 4))
return false;
bool down = is->readU8();
is->skip(2);
bool SMsgReader::readPointerEvent()
{
- if (!is->hasData(5))
+ if (!is->hasData(1 + 2 + 2))
return false;
int mask = is->readU8();
int x = is->readU16();
bool SMsgReader::readClientCutText()
{
- if (!is->hasData(7))
+ if (!is->hasData(3 + 4))
return false;
is->setRestorePoint();
bool SMsgReader::readQEMUKeyEvent()
{
- if (!is->hasData(10))
+ if (!is->hasData(2 + 4 + 4))
return false;
bool down = is->readU16();
rdr::U32 keysym = is->readU32();