X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Wed, 19 Dec 2001 17:38:18 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-Id: <2950-Wed19Dec2001173818+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9 In-reply-to: <9vo9gr$p7e$1@slb1.atl.mindspring.net> (marp@0.0.0.0) Subject: Re: *Newbie= Why isn't this small function working correctly? References: <20011218200551 DOT 38218 DOT qmail AT web13907 DOT mail DOT yahoo DOT com> <9vo9gr$p7e$1 AT slb1 DOT atl DOT mindspring DOT net> 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 > From: "Marp" > Newsgroups: comp.os.msdos.djgpp > Date: Tue, 18 Dec 2001 15:38:54 -0500 > > > there is nothing wrong with > > > > strncpy(new_string, string + start_offset, end_offset - start_offset) > > Don't forget to include the null char at the end because strncpy won't > always do that for you. Or use strncat, which will.