Closed
Bug 612580
Opened 14 years ago
Closed 14 years ago
Javascript implementation of substring causes unexpected behavior when end index is undefined.
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 373118
People
(Reporter: rcurtis, Unassigned)
Details
User-Agent: Opera/9.80 (Windows NT 6.1; U; en) Presto/2.6.30 Version/10.63
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.15) Gecko/20101026 Firefox/3.5.15
If the end index is undefined when calling substring on a string in certain conditions the call will return nothing rather than start index to the end of the string.
Reproducible: Always
Steps to Reproduce:
var testString = "This is a test.";
var startIndex = 0;
var endIndex;
testString.substring(startIndex, endIndex);
Actual Results:
""
Expected Results:
"This is a test."
Comment 1•14 years ago
|
||
Ryan, thanks for the bug report! This will be fixed in Gecko 2.0; you can test out the fix in Firefox 4 beta 7 if you want.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•