Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2017-12-20 15:26:36 +09:00
parent 9d258cf53a
commit 9540c748f5
4 changed files with 27 additions and 4 deletions

View File

@@ -534,8 +534,8 @@ char* MQTTGWPacket::print(char* pbuf)
char* ptr = pbuf;
char** pptr = &pbuf;
int len = getPacketData(packetData);
for (int i = 0; i < len; i++)
int size = len > SIZE_OF_LOG_PACKET ? SIZE_OF_LOG_PACKET : len;
for (int i = 0; i < size; i++)
{
sprintf(*pptr, " %02X", packetData[i]);
*pptr += 3;