Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!uwmacc!uwvax!oddjob!mimsy!cvl!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: comp.sys.ibm.pc Subject: Any fix or workaround for this Turbo C realloc bug? Message-ID: <7513@elsie.UUCP> Date: Mon, 12-Oct-87 15:01:28 EDT Article-I.D.: elsie.7513 Posted: Mon Oct 12 15:01:28 1987 Date-Received: Wed, 14-Oct-87 02:36:16 EDT Organization: NIH-LEC, Bethesda, MD Lines: 23 When I compile and run this program using Turbo C: #include "stdio.h" main() { char * line; extern char * malloc(); extern char * realloc(); line = malloc(1); line[0] = '1'; printf("%c (%d)\n", line[0], line[0]); line = realloc(line, 2); printf("%c (%d)\n", line[0], line[0]); return 1; } I discover that line[0] has changed from under my feet as a result of the realloc call. If you have a fix or workaround, I'd appreciate hearing from you. -- ado@vax2.nlm.nih.gov ADO, VAX, and NIH are trademarks of Ampex and DEC.