mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 11:15:34 +00:00
Bug 140687: Make substring() for all start-indexes
r=Pike, sr=jst
This commit is contained in:
parent
3029e0f9bc
commit
ebde346572
@ -169,7 +169,7 @@ ExprResult* StringFunctionCall::evaluate(Node* aContext, ContextState* aCs)
|
||||
// check for NaN or +/-Inf
|
||||
if (Double::isNaN(start) ||
|
||||
Double::isInfinite(start) ||
|
||||
start + 0.5 >= src.length())
|
||||
start >= src.length() + 0.5)
|
||||
return new StringResult();
|
||||
|
||||
start = floor(start + 0.5) - 1;
|
||||
|
Loading…
Reference in New Issue
Block a user