Open yuxuebao opened 3 years ago
struct2json\inc\s2jdef.h line93 strncpy((to_struct)->_element[index], from_json->valuestring,sizeof((to_struct)->_element)-1); 是不是应该是 strncpy((to_struct)->_element[index], from_json->valuestring,sizeof((to_struct)->_element[index])-1); struct2json\inc\s2jdef.h line106 同样问题.
看着是的,copy 的长度限制应该是数组元素的长度
struct2json\inc\s2jdef.h line93 strncpy((to_struct)->_element[index], from_json->valuestring,sizeof((to_struct)->_element)-1); 是不是应该是 strncpy((to_struct)->_element[index], from_json->valuestring,sizeof((to_struct)->_element[index])-1); struct2json\inc\s2jdef.h line106 同样问题.