1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-09-20 05:53:24 +01:00

Refine error in fsdev_mount_device

This commit is contained in:
TuxSH 2018-05-09 14:16:33 +02:00
parent b2c82c75d0
commit bf94bf48d2

View file

@ -85,11 +85,11 @@ int fsdev_mount_device(const char *name, unsigned int id) {
strcpy(drname, name); strcpy(drname, name);
strcat(drname, ":"); strcat(drname, ":");
if (id >= FF_VOLUMES) { if (id >= FF_VOLUMES || name[0] == '\0') {
errno = EINVAL; errno = EINVAL;
return -1; return -1;
} }
if (name[0] == '\0' || strlen(name) > 32) { if (strlen(name) > 32) {
errno = ENAMETOOLONG; errno = ENAMETOOLONG;
return -1; return -1;
} }