File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -81,13 +81,14 @@ void BridgeTransport::OnRecv(const uvw::data_event& event) {
8181 char len_buf[4 ];
8282 recv_buf_.Peek (len_buf, 4 );
8383 uint32_t size = 0 ;
84- size | = static_cast <uint32_t >(len_buf[0 ]) << 0 ;
85- size |= static_cast <uint32_t >(len_buf[1 ]) << 8 ;
86- size |= static_cast <uint32_t >(len_buf[2 ]) << 16 ;
87- size |= static_cast <uint32_t >(len_buf[3 ]) << 24 ;
84+ size = static_cast <uint32_t >(static_cast < uint8_t >( len_buf[0 ])) |
85+ ( static_cast <uint32_t >(static_cast < uint8_t >( len_buf[1 ])) << 8 ) |
86+ ( static_cast <uint32_t >(static_cast < uint8_t >( len_buf[2 ])) << 16 ) |
87+ ( static_cast <uint32_t >(static_cast < uint8_t >( len_buf[3 ])) << 24 ) ;
8888
8989 if (size > VRBRIDGE_MAX_MESSAGE_SIZE) {
9090 logger_->Log (" message size overflow" );
91+ logger_->Log (std::to_string (size).c_str ());
9192 ResetConnection ();
9293 return ;
9394 }
You can’t perform that action at this time.
0 commit comments