0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +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;
}
void dump() {
void dump() const {
out() << hex;
const char *p = objdata();
for ( int i = 0; i < objsize(); i++ ) {
out() << i << '\t' << (unsigned) *p;
out() << i << '\t' << ( 0xff & ( (unsigned) *p ) );
if ( *p >= 'A' && *p <= 'z' )
out() << '\t' << *p;
out() << endl;