[vlc-commits] ps_psm_fill: fix logic bug spotted by clang

Rafaël Carré git at videolan.org
Sun Dec 4 06:22:27 CET 2011


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Dec  4 00:16:59 2011 -0500| [415c1ab48a995b17c81f2be5d344bdb0499efbd7] | committer: Rafaël Carré

ps_psm_fill: fix logic bug spotted by clang

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=415c1ab48a995b17c81f2be5d344bdb0499efbd7
---

 modules/demux/ps.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/ps.h b/modules/demux/ps.h
index 674c365..939d04c 100644
--- a/modules/demux/ps.h
+++ b/modules/demux/ps.h
@@ -584,8 +584,8 @@ static inline int ps_psm_fill( ps_psm_t *p_psm, block_t *p_pkt,
     i_length = (uint16_t)(p_buffer[4] << 8) + p_buffer[5] + 6;
     if( i_length > i_buffer ) return VLC_EGENERIC;
 
-    //i_current_next_indicator = (p_buffer[6] && 0x01);
-    i_version = (p_buffer[6] && 0xf8);
+    //i_current_next_indicator = (p_buffer[6] & 0x01);
+    i_version = (p_buffer[6] & 0xf8);
 
     if( p_psm->i_version == i_version ) return VLC_EGENERIC;
 



More information about the vlc-commits mailing list