mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-25 19:36:52 +01:00
better check for devoptab name
This commit is contained in:
parent
5f29cee9cb
commit
d5702c9f29
@ -72,7 +72,7 @@ bool fatMount (const char* name, const DISC_INTERFACE* interface, sec_t startSec
|
|||||||
devoptab_t* devops;
|
devoptab_t* devops;
|
||||||
char* nameCopy;
|
char* nameCopy;
|
||||||
|
|
||||||
if(!name || !interface)
|
if(!name || strlen(name) > 8 || !interface)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(!interface->startup())
|
if(!interface->startup())
|
||||||
@ -82,7 +82,7 @@ bool fatMount (const char* name, const DISC_INTERFACE* interface, sec_t startSec
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
char devname[10];
|
char devname[10];
|
||||||
snprintf(devname, 10, "%s:", name);
|
sprintf(devname, "%s:", name);
|
||||||
if(FindDevice(devname) >= 0)
|
if(FindDevice(devname) >= 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user