From: elf AT netcom DOT com (Marc Singer) Message-Id: <199703152044.MAA05258@netcom6.netcom.com> Subject: Re: DJGPP inconsistencies? To: pv AT cs DOT montana DOT edu (Paul Peavyhouse) Date: Sat, 15 Mar 1997 12:44:57 -0800 (PST) Cc: djgpp AT delorie DOT com (DJGPP List Alias) In-Reply-To: <5g9p1b$fac@netra.montana.edu> from "Paul Peavyhouse" at Mar 13, 97 01:44:53 pm MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 593 > DATAFILE *terra; > > int main (int c, char **v) > { > terra = load_datafile("terra.dat"); > char *str; > } > > The funny thing is that if I write it as: > > DATAFILE *terra; > > int main (int c, char **v) > { > char *str; > terra = load_datafile("terra.dat"); > } > My hunch is that load_datafile is clobbering the stack. The char* changes the depth of the stack and could hide the problem. Without all of the code, I cannot say more. You could try debugging the app and see if str changes after the load_file call. -- Marc Singer