Support NaN in path expressions (fix #962)
This commit is contained in:
1 parent
c4524da3e0
commit
4490d9d1f6
2 files changed
+6
-1
No files matched your search
@@ -6,6 +6,7 @@
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "jv_alloc.h"
|
||||
#include "jv.h"
|
||||
@@ -1302,7 +1303,7 @@ int jv_identical(jv a, jv b) {
|
||||
r = a.u.ptr == b.u.ptr;
|
||||
break;
|
||||
case JV_KIND_NUMBER:
|
||||
r = a.u.number == b.u.number;
|
||||
r = a.u.number == b.u.number || (isnan(a.u.number) && isnan(b.u.number));
|
||||
break;
|
||||
default:
|
||||
r = 1;
|
||||
|
||||
Reference in new issue
Block a user