Skip to content
Myr

Accept only bitwise identical NaN values in jv_identical (fix #978)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by David Tolnay · parent 1f7c24f · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/jv.c+1 added-1 removed
1301 unmodified lines
1302 case JV_KIND_OBJECT:1303 r = a.u.ptr == b.u.ptr;1304 break;1305 case JV_KIND_NUMBER:1306 r = a.u.number == b.u.number || (isnan(a.u.number) && isnan(b.u.number));1306 r = memcmp(&a.u.number, &b.u.number, sizeof(a.u.number)) == 0;1307 break;1308 default:1309 r = 1;1310 break;
24 unmodified lines