mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Do not assign negative values to unsigned variables
This commit is contained in:
parent
651ad11ad8
commit
7d5c5f8a24
3 changed files with 3 additions and 4 deletions
|
@ -132,7 +132,7 @@ namespace SceneUtil
|
|||
if (value[0] < 0)
|
||||
{
|
||||
positiveColor *= -1.0;
|
||||
signBit = -1;
|
||||
signBit = ~0u;
|
||||
}
|
||||
unsigned int packedColor = asRGBA(positiveColor);
|
||||
std::memcpy(&(*mData)[getOffset(index, Diffuse)], &packedColor, sizeof(unsigned int));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue