Skip to content

Commit

Permalink
MAP: replace strncpy with strncpy_s
Browse files Browse the repository at this point in the history
The intel c++ w_oneAPI_2021.1.1.99 compiler does not like the `strncpy`
function and won't compile.  Changing to `strncpy_s`.
  • Loading branch information
andrew-platt committed Sep 12, 2024
1 parent 32ad558 commit a41b84a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/map/src/mapapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

Expand Down

0 comments on commit a41b84a

Please sign in to comment.