Date: Tue, 2 Sep 2003 13:24:01 -0400 Message-Id: <200309021724.h82HO1ah017641@envy.delorie.com> From: DJ Delorie To: djgpp-workers AT delorie DOT com CC: Melvin AT HME DOT Ltd DOT uk, djgpp-workers AT delorie DOT com In-reply-to: <7458-Tue02Sep2003201254+0300-eliz@elta.co.il> Subject: Re: Non-compliant strxfrm References: <7458-Tue02Sep2003201254+0300-eliz AT elta DOT co DOT il> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Thanks, but I think this needs some further work, since this fragment: > > if (--n) > *dst++ = c; > > seems to dereference dst even if n is zero. The standard forbids > that, see our prior discussions in this thread. No, it can't. That case is already detected in the preceeding if: if (n < 2) { while (*src++ != 0) r++; break; } if (--n) *dst++ = c;