diff -r b4b69e85ed53 -r 1e5abecc3cde svghmi/svghmi.c --- a/svghmi/svghmi.c Tue Jan 14 11:04:18 2020 +0100 +++ b/svghmi/svghmi.c Tue Jan 14 11:09:26 2020 +0100 @@ -102,6 +102,9 @@ /* if new value differs from previous one */ USINT sz = __get_type_enum_size(dsc->type); + if(__Is_a_string(dsc)){ + sz = ((STRING*)visible_value_p)->len + 1; + } if(dsc->wstate == buf_new || memcmp(dest_p, visible_value_p, sz) != 0){ /* copy and flag as set */ memcpy(dest_p, visible_value_p, sz); @@ -133,6 +136,9 @@ { void *src_p = &wbuf[dsc->buf_index]; void *dst_p = &sbuf[sbufidx]; + if(__Is_a_string(dsc)){ + sz = ((STRING*)src_p)->len + 1; + } /* TODO : force into little endian */ memcpy(dst_p, &index, sizeof(uint32_t)); memcpy(dst_p + sizeof(uint32_t), src_p, sz);