From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1103af,c1db52110ef2b04a X-Google-Attributes: gid1103af,public X-Google-Thread: 111c93,c1db52110ef2b04a X-Google-Attributes: gid111c93,public From: Harlan Grove Subject: Re: sprintf bug? Date: 2000/05/27 Message-ID: <8gnonp$ec6$1@nnrp1.deja.com>#1/1 X-Deja-AN: 627857127 References: <8gmhrd$jqj$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x52.deja.com:80 (Squid/1.1.22) for client 12.72.108.23 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Sat May 27 06:08:00 2000 GMT X-MyDeja-Info: XMYDJUIDhrlngrv Newsgroups: comp.os.linux.alpha,comp.os.linux.misc X-Http-User-Agent: Mozilla/4.51 [en] (X11; I; Linux 2.2.5-15 i686) In article <8gmhrd$jqj$1@nnrp1.deja.com>, U.V. Ravindra wrote: > > I'm using SuSE 6.3 (Kernel 2.2.13 glibc 2.1.2) on an Alpha EV67. > Here's what I'm trying to do > > char buffr[4096+1] > > ... > ... > printf("before %s\n", buffr); > sprintf(buffr, "0, 0, 0, "); > printf("after %s\n", buffr); > > And I see the output: > > before dwki_nr_ibind(100, fname_var, 0, > after 0, 0, 0,i Looks like a bug, but one not shared by i386 Red Hat 6.0 at least. Try storing sprintf()'s result in an integer variable and printing that value. Is it 8 or 9? Sent via Deja.com http://www.deja.com/ Before you buy.