Path: utzoo!attcan!uunet!husc6!mailrus!cornell!batcomputer!sun.soe.clarkson.edu!nelson From: nelson@sun.soe.clarkson.edu (Russ Nelson) Newsgroups: comp.sys.ibm.pc Subject: Re: Compact data model in Turbo C Message-ID: Date: 14 Nov 88 14:30:31 GMT References: <10040@umn-cs.CS.UMN.EDU> Sender: news@sun.soe.clarkson.edu Reply-To: nelson@clutx.clarkson.edu Organization: Clarkson University, Postdam NY Lines: 12 In-reply-to: moll@umn-cs.CS.UMN.EDU's message of 14 Nov 88 00:19:12 GMT In article <10040@umn-cs.CS.UMN.EDU> moll@umn-cs.CS.UMN.EDU (Rick Moll) writes: inbuf=(void*) (malloc(100)); Functions default to int. You are casting a 16 bit int into a 32 bit pointer. Never assume that sizeof(int) == sizeof(void *). -- --russ (nelson@clutx [.bitnet | .clarkson.edu]) To surrender is to remain in the hands of barbarians for the rest of my life. To fight is to leave my bones exposed in the desert waste.