Skip to content
This repository was archived by the owner on Apr 9, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cn-encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static void _write_positive(cn_write_state *ws, cn_cbor_type typ, uint64_t val)
static void _write_double(cn_write_state *ws, double val)
{
float float_val = val;
if (float_val == val) { /* 32 bits is enough and we aren't NaN */
if ((double)float_val == val) { /* 32 bits is enough and we aren't NaN */
uint32_t be32;
uint16_t be16, u16;
union {
Expand Down