From 906a8e8b27c5e846c71d1ae65552d860e1558de7 Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Mon, 3 Jul 2023 04:31:22 -0700 Subject: [PATCH] Correct shortening of camera name in simulate.cc (for UI menu item) Fixes #963 PiperOrigin-RevId: 545187656 Change-Id: Ib213d693569d884915fba99f150df4fd5f53984c --- simulate/simulate.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulate/simulate.cc b/simulate/simulate.cc index 0373afd2..dbf88548 100644 --- a/simulate/simulate.cc +++ b/simulate/simulate.cc @@ -703,7 +703,7 @@ void MakeRenderingSection(mj::Simulate* sim, const mjModel* m, int oldstate) { // add model cameras, up to UI limit for (int i=0; incam, mjMAXUIMULTI-2); i++) { // prepare name - char camname[mjMAXUITEXT] = "\n"; + char camname[mjMAXUINAME] = "\n"; if (m->names[m->name_camadr[i]]) { mju::strcat_arr(camname, m->names+m->name_camadr[i]); } else {