Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!pasteur!ucbvax!hplabs!hp-pcd!hpcvmb!crh From: crh@hpcvmb.HP (Ron Henderson) Newsgroups: comp.sys.ibm.pc Subject: Re: bug in Turbo C 1.5 Message-ID: <3320002@hpcvmb.HP> Date: 25 Jan 88 18:44:12 GMT References: <5298@cit-vax.Caltech.Edu> Organization: HP Corvallis, Oregon. Lines: 25 >reports so far for Turbo C 1.5. Am I the first person to report a >bug in Turbo C 1.5? ^^^ A bug?, I don't think so. > >This program > > ---------------------------------- > #include > > void main() { > char *s = "this is a test"; > printf("%s\n", s); > memcpy(s + 1, s, strlen(s) - 1); > printf("%s\n", s); > } > ---------------------------------- > According to the README file, line 189, the memcpy function now conforms to the ANSI standard. If you want the 'smart' move, you should use memmove, not memcpy. Ron ...!hplabs!hp-pcd!crh