Closed Bug 7437 Opened 26 years ago Closed 26 years ago

nsString Cut() method bug

Categories

(Core Graveyard :: Tracking, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mozilla, Assigned: rickg)

Details

Rick, after your nsString/nsString2 landing, we're noticed a bug that I'm hoping you can fix quickly. Basically, the following code fails: nsAutoString attribValue; if (attribValue.Find("rdf:") == 0) { attribValue = attribValue.Cut(0,4); } The Cut() method seems to be returning crap in "attribValue". It was working fine on Friday afternoon though before your landing.
Priority: P3 → P1
QA Contact: leger → rjc
Rick, removing the assignment ended up fixing the problem, so...I think you're right about it being an edge case with self-assignment.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
This was not a cut problem, but a user error. However, it usefully illustrated that I needed to add logic to the assign and operator= to prevent assigning a string to itself.
Target Milestone: M7
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.