summaryrefslogtreecommitdiff
path: root/atari/plot
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-05-20 20:24:19 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-05-20 20:24:19 +0100
commit768f380d81dbce486fd4801cb4748fecb67f3aa1 (patch)
treea7a98886c5b3cc879821816be512b942e78f1039 /atari/plot
parent59f63984ee7f52b955d7ab5920058f0385bf7576 (diff)
downloadnetsurf-768f380d81dbce486fd4801cb4748fecb67f3aa1.tar.gz
netsurf-768f380d81dbce486fd4801cb4748fecb67f3aa1.tar.bz2
Fix rgb check.
It was doing the same check on green twice, and not checking blue.
Diffstat (limited to 'atari/plot')
-rwxr-xr-xatari/plot/plot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/atari/plot/plot.c b/atari/plot/plot.c
index 2c75db335..e29347f02 100755
--- a/atari/plot/plot.c
+++ b/atari/plot/plot.c
@@ -635,7 +635,7 @@ inline short rgb_to_666_index(unsigned char r, unsigned char g, unsigned char b)
diff_b = abs(r-b);
diff_c = abs(r-b);
if( diff_a < 2 && diff_b < 2 && diff_c < 2 ) {
- if( (r!=0XFF) && (g!=0XFF) && (g!=0XFF) ) {
+ if( (r!=0XFF) && (g!=0XFF) && (b!=0XFF) ) {
if( ((r&0xF0)>>4) != 0 )
//printf("conv gray: %x -> %d\n", ((r&0xF0)>>4) , (OFFSET_CUST_PAL) + ((r&0xF0)>>4) );
return( (OFFSET_CUST_PAL - OFFSET_WEB_PAL) + ((r&0xF0)>>4) );