mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-23 17:21:11 +01:00
-replaced 3 snprintf in code with strncpy, saves a little
bit time maybe, main reason is that its a more proper way ;)
This commit is contained in:
parent
8be989e485
commit
de0306c275
@ -487,12 +487,12 @@ void CMenu::_game(bool launch)
|
||||
if (GC_GameIsInstalled((char *)hdr->hdr.id, DeviceName[SD], DML_DIR))
|
||||
{
|
||||
memset(hdr->path, 0, sizeof(hdr->path));
|
||||
snprintf(hdr->path, sizeof(hdr->path), "%s", (char*)hdr->hdr.id);
|
||||
strncpy(hdr->path, (char*)hdr->hdr.id, sizeof(hdr->path));
|
||||
}
|
||||
else if(GC_GameIsInstalled(gcfolder, DeviceName[SD], DML_DIR))
|
||||
{
|
||||
memset(hdr->path, 0, sizeof(hdr->path));
|
||||
snprintf(hdr->path, sizeof(hdr->path), "%s", gcfolder);
|
||||
strncpy(hdr->path, gcfolder, sizeof(hdr->path));
|
||||
}
|
||||
else if(!GC_GameIsInstalled(hdr->path, DeviceName[SD], DML_DIR) && !_wbfsOp(CMenu::WO_COPY_GAME))
|
||||
break;
|
||||
|
@ -340,7 +340,7 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
|
||||
char gcfolder[300];
|
||||
char dmlgamedir[50];
|
||||
snprintf(dmlgamedir, sizeof(dmlgamedir), "%s", (currentPartition != SD) ? m_DMLgameDir.c_str() : DML_DIR);
|
||||
strncpy(dmlgamedir, (currentPartition != SD) ? m_DMLgameDir.c_str() : DML_DIR, sizeof(dmlgamedir));
|
||||
snprintf(gcfolder, sizeof(gcfolder), "%s [%s]", gcheader.title, (char *)gcheader.id);
|
||||
if (_searchGamesByID((const char *) gcheader.id).size() != 0 || GC_GameIsInstalled((char *)gcheader.id, DeviceName[currentPartition], dmlgamedir) || GC_GameIsInstalled(gcfolder, DeviceName[currentPartition], dmlgamedir))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user