]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
epggrab xmltv: fix suri generation in parse_xmltv_dd_progid 372/head
authorBen Fennema <benjamin.fennema@gmail.com>
Sat, 12 Apr 2014 06:13:01 +0000 (23:13 -0700)
committerBen Fennema <benjamin.fennema@gmail.com>
Tue, 6 May 2014 03:51:39 +0000 (20:51 -0700)
src/epggrab/module/xmltv.c

index 944adb35dd16b92ab13b6fda047d60de68220eba..085c0b995c474f91307f4de1a193a06690d126e7 100755 (executable)
@@ -215,12 +215,12 @@ static void parse_xmltv_dd_progid
 
   /* Episode */
   if (!strncmp("EP", s, 2)) {
-    int e = strlen(buf);
-    while (e && s[e] != '.') e--;
+    int e = strlen(buf)-1;
+    while (e && buf[e] != '.') e--;
     if (e) {
       buf[e] = '\0';
       *suri = strdup(buf);
-      if (s[e+1]) sscanf(s+e+1, "%hu", &(epnum->e_num));
+      if (buf[e+1]) sscanf(&buf[e+1], "%hu", &(epnum->e_num));
     }
   }
 }