mujoco
mujoco copied to clipboard
Incorrect Return Code
In basic.cc, the main function returns 1 at the end.
https://github.com/deepmind/mujoco/blob/833d30858db7c4588a105199d6993a65842ad563/sample/basic.cc#LL189C10-L189C10
It seems like this return would not be an error. So, shouldn't it be returning 0? Or is it an error if the window is closed and the end of main() is reached?
Also, I would recommend using EXIT_SUCCESS and EXIT_FAILURE instead of 0 or 1.
Sure, send us a PR.
Thanks. Just wanted to make sure I was understanding the use of the Mujoco library in the samples. I have created a PR for the changes: https://github.com/deepmind/mujoco/pull/910.