From a41b84a32b3c3b95eca4dc18232aef4c24b534c5 Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Thu, 12 Sep 2024 16:27:17 -0600 Subject: [PATCH] MAP: replace strncpy with strncpy_s The intel c++ w_oneAPI_2021.1.1.99 compiler does not like the `strncpy` function and won't compile. Changing to `strncpy_s`. --- modules/map/src/mapapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/map/src/mapapi.c b/modules/map/src/mapapi.c index 29ac4d3d9..402a1030a 100644 --- a/modules/map/src/mapapi.c +++ b/modules/map/src/mapapi.c @@ -1164,7 +1164,7 @@ MAP_EXTERNCALL void map_set_gravity(MAP_ParameterType_t* p_type, const double gr MAP_EXTERNCALL void map_set_input_text(MAP_InitInputType_t* init_type, const char* input_txt_line) { - strncpy(init_type->library_input_str, input_txt_line, 254); + strncpy_s(init_type->library_input_str, sizeof init_type->library_input_str, input_txt_line, (sizeof init_type->library_input_str)-1); init_type->library_input_str[254] = '\0'; }