tinybson: explicitly append int32 or int64

This commit is contained in:
Daniel Agar
2021-12-30 17:57:17 -05:00
parent 9cbb5c9920
commit 80ef6e19df
5 changed files with 32 additions and 24 deletions
+2 -2
View File
@@ -65,12 +65,12 @@ encode(bson_encoder_t encoder)
return 1;
}
if (bson_encoder_append_int(encoder, "int1", sample_small_int) != 0) {
if (bson_encoder_append_int32(encoder, "int1", sample_small_int) != 0) {
PX4_ERR("FAIL: encoder: append int failed");
return 1;
}
if (bson_encoder_append_int(encoder, "int2", sample_big_int) != 0) {
if (bson_encoder_append_int64(encoder, "int2", sample_big_int) != 0) {
PX4_ERR("FAIL: encoder: append int failed");
return 1;
}