Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Bug in THINK C???? Message-ID: <23243@well.sf.ca.us> Date: 20 Feb 91 04:44:20 GMT References: <9102181103.aa10735@Bonnie.ics.uci.edu> Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 19 In article <9102181103.aa10735@Bonnie.ics.uci.edu> rhutchin@Bonnie.ICS.UCI.EDU writes: >Here's something that is compiled into "error-free" object code in THINK C 4.0: > NumToString((long) BuffCopy, tempStr); >where: > char *BuffCopy; > char *tempStr; you know that the result has to go into a place, i.e.,: char *buffCopy; /* local variables initially contain garbage */ char *tempStr; char strBuf[100]; tempStr = strBuf; /* make tempStr point at a real place */ NumToString((long) buffCopy, tempStr); -- -- David Phillip Oster - At least the government doesn't make death worse. -- oster@well.sf.ca.us = {backbone}!well!oster