Skip to content

Commit 16d135c

Browse files
committed
[js] Make nqp::cmp_n work with nqp::nan properly
1 parent 30d3659 commit 16d135c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vm/js/Operations.nqp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class QAST::OperationsJS {
358358

359359
sub add_cmp_op($op, $type) {
360360
add_simple_op($op, $T_INT, [$type, $type], sub ($a, $b) {
361-
"($a < $b ? -1 : ($a == $b ? 0 : 1))"
361+
"($a < $b ? -1 : ($a > $b ? 1 : 0))"
362362
});
363363
}
364364

0 commit comments

Comments
 (0)