0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 17:10:48 +01:00

fix BSONObj::dump

This commit is contained in:
Eliot Horowitz 2009-10-01 01:26:57 -04:00
parent 1bb3d4a004
commit 80b7497d69

View File

@ -852,11 +852,11 @@ namespace mongo {
return objsize() <= 5; return objsize() <= 5;
} }
void dump() { void dump() const {
out() << hex; out() << hex;
const char *p = objdata(); const char *p = objdata();
for ( int i = 0; i < objsize(); i++ ) { for ( int i = 0; i < objsize(); i++ ) {
out() << i << '\t' << (unsigned) *p; out() << i << '\t' << ( 0xff & ( (unsigned) *p ) );
if ( *p >= 'A' && *p <= 'z' ) if ( *p >= 'A' && *p <= 'z' )
out() << '\t' << *p; out() << '\t' << *p;
out() << endl; out() << endl;