brks icon indicating copy to clipboard operation
brks copied to clipboard

protocol_head.cpp的protocol_head_codec_t::get_byte函数存在缺陷

Open AlexGobin opened this issue 6 years ago • 0 comments

原来protocol_head_codec_t::get_byte函数如下: u8 protocol_head_codec_t::get_byte(u8* buffer, u32 size, u32 offset) { assert(buffer != NULL); assert(offset <= size); return buffer + offset; } 修改如下: u8 protocol_head_codec_t::get_byte(u8* buffer, u32 size, u32 offset) { assert(buffer != NULL); assert(offset <= size); return *(buffer + offset); }

AlexGobin avatar Feb 17 '19 06:02 AlexGobin