X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Martin Ambuhl Newsgroups: comp.os.msdos.djgpp Subject: Re: assembly code of the "strange error" - program Date: Wed, 28 Jul 2004 09:11:38 -0400 Lines: 13 Message-ID: <2mpn0jFmg4duU1@uni-berlin.de> References: <20040727070949 DOT 29244 DOT 00000306 AT mb-m19 DOT aol DOT com> <200407271306 DOT i6RD6e8o010681 AT envy DOT delorie DOT com> <200407271836 DOT i6RIa5vk015726 AT envy DOT delorie DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de VcVqOydbC2JWa/jvAAfxfQMV/NhNmGKi9JO7l9tgSjsihqXfFZ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en, de, fr, ru, zh, ja In-Reply-To: To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Paul Wilkins wrote: > I could've sworn that memset used INT, not BYTE, for the middle element, > so memset would fill the memory range with the integer number 4, and as > U[] is also defined as INT there shouldn't be any trouble such as what > you speak of, no? memset uses neither INT nor BYTE. The second argument of memset is, in fact, of type int, but in a call like memset(buffer, c, size); only the value (unsigned char)c is used. The high-order bits, in an implementation where sizeof(int) > 1, are unused.