Using full path when adding a file to VFS. Fixes #616.
PiperOrigin-RevId: 492204185 Change-Id: If2b2230c095fe0bb776fcc3ffda48f13d0be5cb2
This commit is contained in:
committed by
Copybara-Service
parent
b9b224bfbd
commit
89185b4af2
@@ -93,7 +93,7 @@ int mj_addFileVFS(mjVFS* vfs, const char* directory, const char* filename) {
|
||||
|
||||
// allocate and read
|
||||
int filesize = 0;
|
||||
vfs->filedata[vfs->nfile] = mju_fileToMemory(filename, &filesize);
|
||||
vfs->filedata[vfs->nfile] = mju_fileToMemory(fullname, &filesize);
|
||||
if (!vfs->filedata[vfs->nfile]) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user