diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-10-15 22:29:41 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-10-15 22:29:41 +0000 |
commit | 97618ed23a10b9866dfece67c194fd6a56ec38f3 (patch) | |
tree | 60852001a720d14d7d4e4a0df6b3c075a10469e8 | |
parent | 910d8e91ff8244aef316280a015d1b63a09fb001 (diff) | |
download | librosprite-97618ed23a10b9866dfece67c194fd6a56ec38f3.tar.gz librosprite-97618ed23a10b9866dfece67c194fd6a56ec38f3.tar.bz2 |
Fix potential incorrect colour selection
svn path=/trunk/librosprite/; revision=13067
-rw-r--r-- | librosprite.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/librosprite.c b/librosprite.c index 9ca40c7..04498fe 100644 --- a/librosprite.c +++ b/librosprite.c @@ -687,7 +687,7 @@ static uint32_t rosprite_palette_lookup(struct rosprite* sprite, uint32_t pixel) /* because we're dealing with 8bpp or less */ if (sprite->has_palette) { - if(pixel <= (sprite->palettesize/8)) { + if(pixel < (sprite->palettesize / 8)) { translated_pixel = sprite->palette[pixel]; } else { translated_pixel = sprite_8bpp_palette[pixel]; |