Fix mju_getfiledir when the path contains a mixture of / and \.
PiperOrigin-RevId: 529754511 Change-Id: Ifce2b86bc339a8cae584db639b7901b270e56384
This commit is contained in:
committed by
Copybara-Service
parent
7998fc7fca
commit
496755a55d
@@ -253,11 +253,12 @@ static void vfs_close_callback(mjResource* resource) {
|
||||
|
||||
// getdir callback for the VFS resource provider
|
||||
static void vfs_getdir_callback(mjResource* resource, const char** dir, int* ndir) {
|
||||
*dir = NULL;
|
||||
*ndir = 0;
|
||||
|
||||
if (resource) {
|
||||
mju_getfiledir(resource->name, dir, ndir);
|
||||
*dir = resource->name;
|
||||
*ndir = mju_dirnamelen(resource->name);
|
||||
} else {
|
||||
*dir = NULL;
|
||||
*ndir = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user