diff options
Diffstat (limited to 'blobmsg_json.c')
-rw-r--r-- | blobmsg_json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/blobmsg_json.c b/blobmsg_json.c index 1859211..aee7a64 100644 --- a/blobmsg_json.c +++ b/blobmsg_json.c @@ -249,7 +249,7 @@ static void blobmsg_format_element(struct strbuf *s, struct blob_attr *attr, boo sprintf(buf, "%s", *(uint8_t *)data ? "true" : "false"); break; case BLOBMSG_TYPE_INT16: - sprintf(buf, "%d", be16_to_cpu(*(uint16_t *)data)); + sprintf(buf, "%d", (int16_t) be16_to_cpu(*(uint16_t *)data)); break; case BLOBMSG_TYPE_INT32: sprintf(buf, "%d", (int32_t) be32_to_cpu(*(uint32_t *)data)); |