mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-24 03:42:23 +00:00
Fix warning relating to max 0 with an unsigned variable
I've looked at the code above and can't see anything that would try to lower the value below 0 as it's mostly just addition and dividing
This commit is contained in:
parent
6c8a92b44f
commit
7b82d0e695
1 changed files with 3 additions and 3 deletions
|
@ -1228,13 +1228,13 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch,
|
|||
colorbright = (blendcolor.s.red+blendcolor.s.green+blendcolor.s.blue)/3;
|
||||
|
||||
tempcolor = (finalbright*blendcolor.s.red)/colorbright;
|
||||
tempcolor = min(255, max(0, tempcolor));
|
||||
tempcolor = min(255, tempcolor);
|
||||
cur->s.red = (UINT8)tempcolor;
|
||||
tempcolor = (finalbright*blendcolor.s.green)/colorbright;
|
||||
tempcolor = min(255, max(0, tempcolor));
|
||||
tempcolor = min(255, tempcolor);
|
||||
cur->s.green = (UINT8)tempcolor;
|
||||
tempcolor = (finalbright*blendcolor.s.blue)/colorbright;
|
||||
tempcolor = min(255, max(0, tempcolor));
|
||||
tempcolor = min(255, tempcolor);
|
||||
cur->s.blue = (UINT8)tempcolor;
|
||||
cur->s.alpha = image->s.alpha;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue