changeset 35223:425467b5be98

Fix off-by-one error in range check.
author reimar
date Wed, 31 Oct 2012 20:44:16 +0000
parents 27640f4f0479
children b4d9b416a8f1
files libmpdemux/demux_mov.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c	Wed Oct 31 20:41:07 2012 +0000
+++ b/libmpdemux/demux_mov.c	Wed Oct 31 20:44:16 2012 +0000
@@ -1224,7 +1224,7 @@
 		      if (count_flag & 0x8000)
 		        entry = i;
 		      // only care about top 8 bits of 16-bit R, G, or B value
-		      if (entry <= palette_count && entry >= 0)
+		      if (entry < palette_count && entry >= 0)
 		      {
 		        palette_map[entry * 4 + 2] = trak->stdata[hdr_ptr + 0];
 		        palette_map[entry * 4 + 1] = trak->stdata[hdr_ptr + 2];