diff options
Diffstat (limited to 'src/chunklets')
-rw-r--r-- | src/chunklets/msg.c | 6 | ||||
-rw-r--r-- | src/chunklets/msg.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/chunklets/msg.c b/src/chunklets/msg.c index 0e26a80..d99edc1 100644 --- a/src/chunklets/msg.c +++ b/src/chunklets/msg.c @@ -197,7 +197,7 @@ void msg_putssz5(unsigned char *out, int sz) { } int msg_putssz8(unsigned char *out, int sz) { - if (sz < 64) { msg_putssz5(out, sz); return 1; } + if (sz < 32) { msg_putssz5(out, sz); return 1; } out[0] = 0xD9; out[1] = sz; return 2; @@ -241,7 +241,7 @@ void msg_putasz4(unsigned char *out, int sz) { } int msg_putasz16(unsigned char *out, int sz) { - if (sz < 32) { msg_putasz4(out, sz); return 1; } + if (sz < 16) { msg_putasz4(out, sz); return 1; } out[0] = 0xDC; doput16(out, sz); return 3; @@ -259,7 +259,7 @@ void msg_putmsz4(unsigned char *out, int sz) { } int msg_putmsz16(unsigned char *out, int sz) { - if (sz < 32) { msg_putmsz4(out, sz); return 1; } + if (sz < 16) { msg_putmsz4(out, sz); return 1; } out[0] = 0xDE; doput16(out, sz); return 3; diff --git a/src/chunklets/msg.h b/src/chunklets/msg.h index b85bde3..c40bdbe 100644 --- a/src/chunklets/msg.h +++ b/src/chunklets/msg.h @@ -162,7 +162,7 @@ void msg_putf(unsigned char *out, float val); int msg_putd(unsigned char *out, double val); /* - * Writes the string size sz in the range [0, 15] to the buffer out. Values + * Writes the string size sz in the range [0, 31] to the buffer out. Values * outside this range will produce an undefined encoding. Always writes a single * byte. * |