Skip to content

Commit

Permalink
fix slip protocol argument padding
Browse files Browse the repository at this point in the history
  • Loading branch information
tve committed Feb 20, 2016
1 parent ad5182a commit 69f09eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.adoc
Expand Up @@ -24,8 +24,8 @@ but significantly reqritten and no longer protocol compatible, thanks to tuanpmt
inspiration!

Many thanks to https://github.com/brunnels for contributions in particular around the espduino
functionality. Thank you also to https://github.com/susisstrolch and https://github.com/bc547 for
additional contributions!
functionality. Thank you also to https://github.com/susisstrolch, https://github.com/bc547,
and https://github.com/katast for additional contributions!

[float]
Table of Contents
Expand Down
2 changes: 1 addition & 1 deletion cmd/cmd.c
Expand Up @@ -63,7 +63,7 @@ cmdResponseBody(const void *data, uint16_t len) {
cmdProtoWriteBuf(data, len);
resp_crc = crc16_data(data, len, resp_crc);

uint16_t pad = (4-(len&3))&3; // get to multiple of 4
uint16_t pad = (4-((len+2)&3))&3; // get to multiple of 4
if (pad > 0) {
uint32_t temp = 0;
cmdProtoWriteBuf((uint8_t*)&temp, pad);
Expand Down

0 comments on commit 69f09eb

Please sign in to comment.