summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdb/pipeline/expression.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/pipeline/expression.cpp b/db/pipeline/expression.cpp
index 8fb7a5fe247..b3caefcf899 100755
--- a/db/pipeline/expression.cpp
+++ b/db/pipeline/expression.cpp
@@ -2605,8 +2605,8 @@ namespace mongo {
(pLength->getType() == NumberInt
|| pLength->getType() == NumberLong
|| pLength->getType() == NumberDouble));
- long long lower = pLower->coerceToLong();
- long long length = pLength->coerceToLong();
+ string::size_type lower = static_cast< string::size_type >( pLower->coerceToLong() );
+ string::size_type length = static_cast< string::size_type >( pLength->coerceToLong() );
return Value::createString( str.substr(lower, length) );
}