Bug 140687: Make substring() for all start-indexes

r=Pike, sr=jst
This commit is contained in:
sicking%bigfoot.com 2005-11-02 07:37:38 +00:00
parent 3029e0f9bc
commit ebde346572

View File

@ -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;