reversed dest and src in memcpy