loop test is incorrect for strnchr and strnrchr

RESOLVED DUPLICATE of bug 96571

Status

NSPR
NSPR
RESOLVED DUPLICATE of bug 96571
16 years ago
16 years ago

People

(Reporter: bbaetz, Assigned: Wan-Teh Chang)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

16 years ago
See bug 82200 - the for loops need to have the condition reversed, so that eg,
line 73 is changed to read:

for( ; n && *s; s++, n-- ) instead of for( ; *s && n; s++, n-- )
and similarly for strnrchr. See the discussion in bug 82200.

There do not appear to be any users of these functions in the mozilla codebase,
but it should be fixed anyway.
(Reporter)

Comment 1

16 years ago
wtc beat me to it...

*** This bug has been marked as a duplicate of 96571 ***
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.