From ded23cfa948ef224075e59340a4ab70f3b1b9f28 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Thu, 21 Jun 2012 11:06:27 +0100 Subject: Fix minor bug with deco sample tool If particles are not being drawn with blendpixel, then it is possible for the R/G/B component of a pixel to be 255. Adding 1 gives 256, which does not produce the right colour when combined into a RRGGBB value diff --git a/src/interface.c b/src/interface.c index 689ef13..8c494b7 100644 --- a/src/interface.c +++ b/src/interface.c @@ -5949,9 +5949,9 @@ unsigned int decorations_ui(pixel *vid_buf,int *bsx,int *bsy, unsigned int saved cb = PIXB(tempcolor); if (cr || cg || cb) { - if (cr) cr++; - if (cg) cg++; - if (cb) cb++; + if (cr && cr<255) cr++; + if (cg && cg<255) cg++; + if (cb && cb<255) cb++; currR = cr; currG = cg; currB = cb; -- cgit v0.9.2-21-gd62e