Closed
Bug 212114
Opened 22 years ago
Closed 22 years ago
FormatStatusMessage broken for aStatusArg with more than two args
Categories
(Core :: Internationalization, defect)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
People
(Reporter: jag+mozilla, Assigned: jag+mozilla)
References
()
Details
Attachments
(1 file)
777 bytes,
patch
|
darin.moz
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
804 PRInt32 pos = args.FindChar('\n', offset);
805 if (pos == -1)
806 pos = args.Length();
807 argArray[i] = ToNewUnicode(Substring(args, offset, pos));
This should be |Substring(args, offset, pos - offset)|, since the third param is
a length one. For just one arg it'll be fine since offset is 0, and if there are
only two args, |Substring| will just take |NS_MIN(offset + pos
/*args.Length()*/, args.Length())| for the length param. For more than two args
the ones in the middle will go beyond the \n.
Assignee | ||
Comment 1•22 years ago
|
||
Note that the old code |args.Mid(arg, offset, pos)| was doing this incorrectly
too.
Assignee | ||
Updated•22 years ago
|
Attachment #127289 -
Flags: superreview?(dbaron)
Attachment #127289 -
Flags: review?(darin)
Comment 2•22 years ago
|
||
Comment on attachment 127289 [details] [diff] [review]
Fix oops
r=darin
Attachment #127289 -
Flags: review?(darin) → review+
Attachment #127289 -
Flags: superreview?(dbaron) → superreview+
Assignee | ||
Comment 3•22 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•