1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix bad casts in updater code

This commit is contained in:
tux3 2015-12-21 20:16:48 +01:00
parent d3e266b71b
commit f61332bc56
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -157,18 +157,18 @@ QByteArray rangedSingleToData(float value, float min, float max, int numberOfBit
numberOfBits -= 8; numberOfBits -= 8;
if (numberOfBits <= 8) if (numberOfBits <= 8)
{ {
data += (unsigned char)source>>8; data += (unsigned char)(source>>8);
return data; return data;
} }
data += (unsigned char)source>>8; data += (unsigned char)(source>>8);
numberOfBits -= 8; numberOfBits -= 8;
if (numberOfBits <= 8) if (numberOfBits <= 8)
{ {
data += (unsigned char)source>>16; data += (unsigned char)(source>>16);
return data; return data;
} }
data += (unsigned char)source>>16; data += (unsigned char)(source>>16);
data += (unsigned char)source>>24; data += (unsigned char)(source>>24);
return data; return data;
} }