From 4d2c980520bb6fe9f213a0a8ca4630cabfb75c79 Mon Sep 17 00:00:00 2001 From: thakkie Date: Thu, 26 Nov 2020 12:38:12 +0100 Subject: [PATCH] Fix issue #1134 Fixes issue #1134: "Edit/show document: incorrect value in binary $type field in JSON" --- src/robomongo/core/utils/BsonUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robomongo/core/utils/BsonUtils.cpp b/src/robomongo/core/utils/BsonUtils.cpp index 7de9ae53f..262b1a821 100644 --- a/src/robomongo/core/utils/BsonUtils.cpp +++ b/src/robomongo/core/utils/BsonUtils.cpp @@ -250,7 +250,7 @@ namespace Robomongo break; case BinData: { int len = *(int *)( elem.value() ); - BinDataType type = BinDataType( *(char *)( (int *)( elem.value() ) + 1 ) ); + BinDataType type = BinDataType( *(unsigned char *)( (int *)( elem.value() ) + 1 ) ); if (type == mongo::bdtUUID || type == mongo::newUUID) { s << HexUtils::formatUuid(elem, uuidEncoding);