1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 23:11:19 +01:00

sys/ubjson: Do not invert bool when writing it

This commit is contained in:
Frank Hessel 2019-06-14 19:08:14 +02:00
parent ea36d68703
commit 71b3e02a3f
No known key found for this signature in database
GPG Key ID: E4DB68890A128F7B

View File

@ -70,7 +70,7 @@ ssize_t ubjson_write_bool(ubjson_cookie_t *restrict cookie, bool value)
{
static const char marker_false[] = { UBJSON_MARKER_FALSE };
static const char marker_true[] = { UBJSON_MARKER_TRUE };
return cookie->rw.write(cookie, value ? &marker_false : &marker_true, 1);
return cookie->rw.write(cookie, value ? &marker_true : &marker_false, 1);
}
ssize_t ubjson_write_i32(ubjson_cookie_t *restrict cookie, int32_t value)