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:
parent
d3e266b71b
commit
f61332bc56
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user