Copybara import of the project:
-- a5221e754c88580d103bfc7bfaf1ed32927ca499 by omar rayyan <olr7742@nyu.edu>: Fix .mjz loading in simulate COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/3384 from omarrayyann:fix-mjz-simulate a5221e754c88580d103bfc7bfaf1ed32927ca499 PiperOrigin-RevId: 944573851 Change-Id: Ifba77ee9f9b97a7d8c0b0a47ac82d390a273672b
This commit is contained in:
committed by
Copybara-Service
parent
18147c50c8
commit
040872fd65
@@ -233,9 +233,14 @@ mjPLUGIN_LIB_INIT(mjz_decoder) {
|
||||
if (size <= 0) {
|
||||
return nullptr;
|
||||
}
|
||||
char error[1024];
|
||||
return ParseZipBuffer(buffer, size, resource->name, const_cast<mjVFS*>(vfs),
|
||||
error, sizeof(error));
|
||||
char error[1024] = "";
|
||||
mjSpec* spec = ParseZipBuffer(buffer, size, resource->name,
|
||||
const_cast<mjVFS*>(vfs), error,
|
||||
sizeof(error));
|
||||
if (!spec && error[0]) {
|
||||
mju_warning("%s", error);
|
||||
}
|
||||
return spec;
|
||||
};
|
||||
mjp_registerDecoder(&decoder);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user