Use C++ strcpy_arr in xml_native_reader_test.
PiperOrigin-RevId: 455375707 Change-Id: Ia3dbb11886ab29c4ad3192e4f78b4b60b94baad0
This commit is contained in:
committed by
Copybara-Service
parent
307cf692e5
commit
69a506e6ba
@@ -15,6 +15,10 @@
|
||||
#ifndef MUJOCO_SRC_ENGINE_ENGINE_ARRAY_SAFETY_H_
|
||||
#define MUJOCO_SRC_ENGINE_ENGINE_ARRAY_SAFETY_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
#error This file should not be used from C++ code.
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <mujoco/mjmodel.h>
|
||||
#include <mujoco/mujoco.h>
|
||||
#include "src/engine/engine_array_safety.h"
|
||||
#include "src/cc/array_safety.h"
|
||||
#include "src/engine/engine_util_errmem.h"
|
||||
#include "test/fixture.h"
|
||||
|
||||
@@ -147,7 +147,7 @@ TEST_F(UserDataTest, RaiseNanWarning) {
|
||||
static char warning[1024];
|
||||
warning[0] = '\0';
|
||||
mju_user_warning = [](const char* msg) {
|
||||
mjSTRNCPY(warning, msg);
|
||||
util::strcpy_arr(warning, msg);
|
||||
};
|
||||
mjModel* model = LoadModelFromString(xml, error.data(), error.size());
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
|
||||
Reference in New Issue
Block a user