Skip to content

Commit

Permalink
[network/upnp] fix validity check for episode number
Browse files Browse the repository at this point in the history
  • Loading branch information
Montellese committed Apr 1, 2021
1 parent 248e1ba commit 83fd23c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xbmc/network/upnp/UPnPInternal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ PopulateTagFromObject(CVideoInfoTag& tag,

int episode;
int season;
if (object.m_Recorded.episode_number >= 0 && object.m_Recorded.episode_season < (NPT_UInt32)-1) {
if (object.m_Recorded.episode_number > 0 && object.m_Recorded.episode_season < (NPT_UInt32)-1) {
tag.m_iEpisode = object.m_Recorded.episode_number;
tag.m_iSeason = object.m_Recorded.episode_season;
} else if(sscanf(object.m_Recorded.program_title, "S%2dE%2d", &season, &episode) == 2 && title >= 0) {
Expand Down

0 comments on commit 83fd23c

Please sign in to comment.