mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
- added precautions to hopefully keep weird characters and names out of categories.ini when using plugins/emuflow
This commit is contained in:
parent
bc03c566f2
commit
1b33874ca5
@ -1509,13 +1509,24 @@ void CMenu::_initCF(void)
|
||||
u64 chantitle = m_gameList[i].hdr.chantitle;
|
||||
if (m_current_view == COVERFLOW_CHANNEL && chantitle == HBC_108)
|
||||
strncpy((char *) m_gameList[i].hdr.id, "JODI", 6);
|
||||
if (m_current_view == COVERFLOW_EMU)
|
||||
if(m_current_view == COVERFLOW_EMU)
|
||||
{
|
||||
string tempname(m_gameList[i].path);
|
||||
if(tempname.empty() || tempname.find_first_of('/') == string::npos)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
tempname.erase(0, tempname.find_first_of('/')+1);
|
||||
string dirName = tempname.substr(0, tempname.find_first_of('/')+1);
|
||||
if (tempname.find_first_of('/') == string::npos)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
tempname.assign(&tempname[tempname.find_last_of('/') + 1]);
|
||||
if(tempname.find_last_of('.') != string::npos)
|
||||
if(tempname.find_last_of('.') == string::npos)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
tempname.erase(tempname.find_last_of('.'), tempname.size() - tempname.find_last_of('.'));
|
||||
id = dirName+tempname;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user