From: Fabrice ILPONSE Newsgroups: comp.os.msdos.djgpp Subject: Re: problem with memory allocation (I think) Date: Thu, 08 Jan 1998 12:32:42 +0100 Organization: Universites Paris VI/Paris VII - France Lines: 21 Message-ID: <34B4B95A.7F72@trash.lip6.fr> References: NNTP-Posting-Host: asim.lip6.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Eli Zaretskii wrote: > > should have been written like this: > > buffer = (unsigned int *)malloc(640 * 480 * sizeof(int)); > In fact, I think he wants to access shorts and not ints (the reason of multiply by 2) so he should change the buffer type from unsigned int to unsigned short!! -- ^ ^ ^ | | | +-+-+ Fabrice ILPONSE | | | -