summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2011-10-15 22:29:41 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2011-10-15 22:29:41 +0000
commit97618ed23a10b9866dfece67c194fd6a56ec38f3 (patch)
tree60852001a720d14d7d4e4a0df6b3c075a10469e8
parent910d8e91ff8244aef316280a015d1b63a09fb001 (diff)
downloadlibrosprite-97618ed23a10b9866dfece67c194fd6a56ec38f3.tar.gz
librosprite-97618ed23a10b9866dfece67c194fd6a56ec38f3.tar.bz2
Fix potential incorrect colour selection
svn path=/trunk/librosprite/; revision=13067
-rw-r--r--librosprite.c2
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];