Skip to content

Commit 7cc110d

Browse files
committed
ColorTransition: small fix backported from 291b181)
1 parent 8a33584 commit 7cc110d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/libgfx/ColorTransition.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ u_short ColorTransition(u_short from, u_short to, u_short step) {
55
short r = (from & 0xf00) | ((to >> 4) & 0x0f0) | step;
66
short g = ((from << 4) & 0xf00) | (to & 0x0f0) | step;
77
short b = ((from << 8) & 0xf00) | ((to << 4) & 0x0f0) | step;
8-
9-
return (colortab[r] << 4) | colortab[g] | (colortab[b] >> 4);
8+
9+
r = colortab[r];
10+
g = colortab[g];
11+
b = colortab[b];
12+
13+
return (r << 4) | g | (b >> 4);
1014
}

0 commit comments

Comments
 (0)