Advertisement
Guest User

Untitled

a guest
Sep 21st, 2012
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.65 KB | None | 0 0
  1. diff --git a/src/epggrab/module/eit.c b/src/epggrab/module/eit.c
  2. index f3450f5..22cb744 100644
  3. --- a/src/epggrab/module/eit.c
  4. +++ b/src/epggrab/module/eit.c
  5. @@ -368,12 +368,14 @@ static int _eit_desc_content
  6.  static int _eit_desc_parental
  7.    ( epggrab_module_t *mod, uint8_t *ptr, int len, eit_event_t *ev )
  8.  {
  9. -  int cnt = 0, sum = 0;
  10. +  int cnt = 0, sum = 0, i = 0;
  11.    while (len > 3) {
  12. -    if ( ptr[3] && ptr[3] < 0x10 ) {
  13. +    if ( ptr[i] && ptr[i] < 0x10 ) {
  14.        cnt++;
  15. -      sum += (ptr[3] + 3);
  16. +      sum += (ptr[i] + 3);
  17.      }
  18. +    len -= 4;
  19. +    i   += 4;
  20.    }
  21.    // Note: we ignore the country code and average the lot!
  22.    if (cnt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement