1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

Merge pull request #11702 from fhessel/fix-ubjson-bool

sys/ubjson: Do not invert bool when writing it
This commit is contained in:
Leandro Lanzieri 2019-06-17 16:17:29 +02:00 committed by GitHub
commit 3f348f50fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)