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

r=Pike, sr=jst


git-svn-id: svn://10.0.0.236/trunk@120451 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sicking%bigfoot.com
2002-05-01 19:48:59 +00:00
parent 337bbcf489
commit ebb009d928

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;