diff --git a/db/key.cpp b/db/key.cpp index 35231752c0c..06936959e6a 100644 --- a/db/key.cpp +++ b/db/key.cpp @@ -602,11 +602,15 @@ namespace mongo { return false; l += 4; r += 4; case cdate: - case cdouble: if( *((unsigned long long *) l) != *((unsigned long long *) r) ) return false; l += 8; r += 8; break; + case cdouble: + if( *((double *) l) != *((double *) r) ) + return false; + l += 8; r += 8; + break; case cstring: { unsigned sz = ((unsigned) *l) + 1; diff --git a/dbtests/btreetests.inl b/dbtests/btreetests.inl index fe1ba902d97..017c54e57c3 100644 --- a/dbtests/btreetests.inl +++ b/dbtests/btreetests.inl @@ -1602,7 +1602,6 @@ class SignedZeroDuplication : public Base { public: void run() { - if ( 0 ) { // SERVER-3682 ASSERT_EQUALS( 0.0, -0.0 ); DBDirectClient c; c.ensureIndex( ns(), BSON( "b" << 1 ), true ); @@ -1610,7 +1609,6 @@ c.insert( ns(), BSON( "b" << 1.0 ) ); c.update( ns(), BSON( "b" << 1.0 ), BSON( "b" << -0.0 ) ); ASSERT_EQUALS( 1U, c.count( ns(), BSON( "b" << 0.0 ) ) ); - } } };