On 13 May 2008, at 00:17, Martin Friebe wrote:

move(somepchar^,pchar(ansi_str_dest)^,len);

doesn't check fpc_ansistr_unique. So it works only if ansi_str_dest has only one reference; or both strings will be modified (because no copy-on-write happens).

At least, that's what I get to see, if I compile with -al and look at the assembler.

You can call uniquestring(ansi_str_dest) before the move()


Jonas
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to