delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/08/06:45:43

From: Fabrice ILPONSE <fabrice AT trash DOT lip6 DOT fr>
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: <Pine DOT SUN DOT 3 DOT 91 DOT 980108105452 DOT 8789O-100000 AT is>
NNTP-Posting-Host: asim.lip6.fr
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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
	  |	<fabrice AT asim DOT lip6 DOT fr>
	  |
	  |
	  -

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019