Skip to content

Commit

Permalink
[videoinfoscanner] fix infinite loop
Browse files Browse the repository at this point in the history
also fixes infinite loop when items[0] is a file
  • Loading branch information
tamland committed Nov 18, 2014
1 parent 2cd9438 commit e7e7e3d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions xbmc/video/VideoInfoScanner.cpp
Expand Up @@ -762,14 +762,16 @@ namespace VIDEO
while (x < items.Size())
{
if (items[x]->m_bIsFolder)
{
x++;
continue;

}

CStdString strPathX, strFileX;
URIUtils::Split(items[x]->GetPath(), strPathX, strFileX);
//CLog::Log(LOGDEBUG,"%i:%s:%s", x, strPathX.c_str(), strFileX.c_str());

int y = x + 1;
const int y = x + 1;
if (strFileX.Equals("VIDEO_TS.IFO"))
{
while (y < items.Size())
Expand All @@ -790,7 +792,7 @@ namespace VIDEO
break;
}
}
x = y;
x++;
}

// enumerate
Expand Down

0 comments on commit e7e7e3d

Please sign in to comment.