Hello Nigel, It current form it is not working. See my finding below. On 23.08.2021 17:36, Tkaczyk, Mariusz wrote:
+ int l = strlen(ve->name);
i think that you want to use name instead of ve->name. length of ve->name is zero after memset.
+ if (l > 16) + l = 16;I think that whole "if" statement can be replaced by: strnlen(ve->name, sizeof(ve->name))
I did a mistake here. I want to suggest usage of: l = strnlen(name, sizeof(ve->name));
+ memcpy(ve->name, name, l); + }
Thanks, Mariusz