Sender: aditya AT wipsys DOT soft DOT net Message-ID: <35CB167B.7B4FC27F@wipsys.soft.net> Date: Fri, 07 Aug 1998 10:00:11 -0500 From: Aditya Kapur Organization: Wipro Systems MIME-Version: 1.0 To: Chia , djgpp AT delorie DOT com Subject: Re: Strange Function Behavior References: <6qdq5j$as2 AT nnrp2 DOT farm DOT idt DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk this loop is executing strlen everytime so when you overwrite the last 0 character the size changes. i recomend that you use something like this int len; len=(int)strlen(name): for(int c = i; c < len;c++) name[c] = name[c + 1]; Chia wrote: > Well, I commented out code and found that in parseTitle, I found that > the loop > > for(int c = i; c < (int)strlen(name);c++) name[c] = name[c + 1]; > > was causing the problems. > aditya -- -------------------------------------------------- Aditya Kapur Wipro Infotech Ltd. Sr. Systems Engg. 40/1A Lavelle Road, Ph 080-2215010 Extn 109 Bangalore -1, INDIA ---------------------------------------------------