tccgen.c: Use memmove for struct assignment: dest and src may be equal.

master
Edmund Grimley Evans 2015-11-04 20:23:17 +00:00
parent 8eab556ac5
commit b051549f2e
1 changed files with 2 additions and 1 deletions

View File

@ -2576,7 +2576,8 @@ ST_FUNC void vstore(void)
vpush_global_sym(&func_old_type, TOK_memcpy4);
else
#endif
vpush_global_sym(&func_old_type, TOK_memcpy);
/* Use memmove, rather than memcpy, as dest and src may be same: */
vpush_global_sym(&func_old_type, TOK_memmove);
vswap();
/* source */