diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-10-28 14:31:56 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-10-28 14:31:56 +0200 |
commit | babb6dc29a5c4af60292ffad5216317d13e2a685 (patch) | |
tree | d5de3240e0112310c5ffc90ead6935333d5f9f78 /shared | |
parent | 4cd465332087e4ab12709f28fae55df10e1a1154 (diff) |
fix off-by-one error and create macro for switching serial debug print color
Diffstat (limited to 'shared')
-rw-r--r-- | shared/protocol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/protocol.c b/shared/protocol.c index e17a728..8887070 100644 --- a/shared/protocol.c +++ b/shared/protocol.c @@ -142,6 +142,6 @@ unsigned short ws_protocol_get_header_size(ws_s_protocol_res* response) { unsigned short size = 2; // comma and trailing newline if (response->success == WS_PROTOCOL_CMD_RETURN_OK) size += 2; // ok if (response->success == WS_PROTOCOL_CMD_RETURN_ERROR) size += 5; // error - size += ws_log16(response->msg->bytes); // amount of characters for message size (hex) + size += ws_log16(response->msg->bytes) + 1; // amount of characters for message size (hex) return size; }
\ No newline at end of file |