Skip to content

Commit 226288b

Browse files
authored
Merge pull request #905 from phunkyfish/fix-xmltv-format-check-omega
Fix xmltv format check omega
2 parents 30a01d1 + 262fd16 commit 226288b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

pvr.iptvsimple/addon.xml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<addon
33
id="pvr.iptvsimple"
4-
version="21.9.2"
4+
version="21.9.3"
55
name="IPTV Simple Client"
66
provider-name="nightik and Ross Nicholson">
77
<requires>@ADDON_DEPENDS@

pvr.iptvsimple/changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v21.9.3
2+
- Fix XMLTV format check
3+
14
v21.9.2
25
- Fix XML file format check
36
- Always treat special paths as local

src/iptvsimple/Epg.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ const XmltvFileFormat Epg::GetXMLTVFileFormat(const char* buffer)
226226
if (!buffer)
227227
return XmltvFileFormat::INVALID;
228228

229-
if ((buffer[0] != '\x3C' && buffer[std::strlen(buffer) - 1] != '\x3E') || // Start with < and ends with >
230-
(buffer[0] != '\x3C' && buffer[1] != '\x3F' && buffer[2] != '\x78' && // xml should starts with '<?xml'
231-
buffer[3] != '\x6D' && buffer[4] != '\x6C'))
229+
if ((buffer[0] == '\x3C' && buffer[std::strlen(buffer) - 1] == '\x3E') || // Start with < and ends with >
230+
(buffer[0] == '\x3C' && buffer[1] == '\x3F' && buffer[2] == '\x78' && // xml should starts with '<?xml'
231+
buffer[3] == '\x6D' && buffer[4] == '\x6C'))
232232
{
233233
return XmltvFileFormat::NORMAL;
234234
}

0 commit comments

Comments
 (0)