Fix crash in simu caused by uninitialised pointer if f_opendir() returns an error

This commit is contained in:
Raphael Coeffic
2021-09-29 17:20:48 +02:00
parent 2f65ec4c58
commit bf00ad22f6
+2
View File
@@ -440,6 +440,8 @@ FRESULT f_opendir (DIR * rep, const TCHAR * name)
TRACE_SIMPGMSPACE("f_opendir(%s) = OK", path.c_str());
return FR_OK;
}
rep->obj.fs = nullptr;
TRACE_SIMPGMSPACE("f_opendir(%s) = error %d (%s)", path.c_str(), errno, strerror(errno));
return FR_NO_PATH;
}