Skip to content

Commit df53f37

Browse files
committed
CXX-277 Cast to unsigned to allow large char value
1 parent a3fefe8 commit df53f37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mongo/bson/bson_validate_test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ namespace {
108108
for ( int i=4; i<theObject.objsize()-1; i++ ) {
109109
BSONObj mine = theObject.copy();
110110

111-
char* data = const_cast<char*>(mine.objdata());
111+
unsigned char* data = reinterpret_cast<unsigned char*>(
112+
const_cast<char*>(mine.objdata()));
112113

113114
data[ i ] = 200;
114115

0 commit comments

Comments
 (0)