diff --git a/scripting/engine_spidermonkey.cpp b/scripting/engine_spidermonkey.cpp index 6267a3fa545..5d66f15555d 100644 --- a/scripting/engine_spidermonkey.cpp +++ b/scripting/engine_spidermonkey.cpp @@ -219,7 +219,7 @@ namespace mongo { ( (boost::uint64_t)(boost::uint32_t)getNumber( o , "top" ) << 32 ) + ( boost::uint32_t)( getNumber( o , "bottom" ) ); } else { - val = (boost::uint64_t) getNumber( o, "floatApprox" ); + val = (boost::uint64_t)(boost::int64_t) getNumber( o, "floatApprox" ); } return val; }