finsh: fix bug when doing string copy