Closed Bug 96572 Opened 23 years ago Closed 23 years ago

loop test is incorrect for strnchr and strnrchr

Categories

(NSPR :: NSPR, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 96571

People

(Reporter: bbaetz, Assigned: wtc)

References

()

Details

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.
wtc beat me to it...

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