Date: Mon, 15 Mar 2004 02:44:38 -0800 (PST) From: Adam Bozanich <abozan01@ccsf.edu> To: Zhang Weiwu <weiwuzhang@hotmail.com> Cc: questions@freebsd.org Subject: Re: [OT?] write C program with UTF16LE Message-ID: <Pine.HPX.4.44.0403150240290.1464-100000@hills.ccsf.cc.ca.us> In-Reply-To: <Pine.HPX.4.44.0403150219470.1464-100000@hills.ccsf.cc.ca.us>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 15 Mar 2004, Adam Bozanich wrote: > > Sorry, There is an error here. fgets() reads the number you specify minus one chars, then null terminates the string. these lines: > > char delbuf[CHUNKSIZE]; > char chunks[CHUNKSIZE * MAX_CHUNK_COUNT]; > Should be: char delbuf[CHUNKSIZE + 1]; char chunks[CHUNKSIZE * MAX_CHUNK_COUNT + 1 ]; -Adam
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.HPX.4.44.0403150240290.1464-100000>