File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -415,12 +415,12 @@ static struct {
415
415
return -1 ;
416
416
}
417
417
if (IS_INTEGER (val )) {
418
- if (VAL_INT64 (val ) > 0 ) return 1 ;
418
+ if (VAL_INT64 (val ) < 0 ) return 1 ;
419
419
if (VAL_INT64 (val ) == 0 ) return 0 ;
420
420
return -1 ;
421
421
}
422
422
if (IS_DECIMAL (val )) {
423
- if (VAL_DECIMAL (val ) > 0 ) return 1 ;
423
+ if (VAL_DECIMAL (val ) < 0 ) return 1 ;
424
424
if (VAL_DECIMAL (val ) == 0 ) return 0 ;
425
425
return -1 ;
426
426
}
Original file line number Diff line number Diff line change @@ -117,6 +117,8 @@ Rebol [
117
117
--test-- "SORT/compare"
118
118
;@@ https://github.com/rebol/rebol-issues/issues/720
119
119
--assert [3 2 1 ] = sort/compare [1 2 3 ] func [a b] [a > b]
120
+ ;@@ https://github.com/rebol/rebol-issues/issues/2376
121
+ --assert [1 3 10 ] = sort/compare [1 10 3 ] func[x y][case [x > y [1 ] x < y [-1 ] true [0 ]]]
120
122
121
123
--test-- "SORT/skip/compare"
122
124
;@@ https://github.com/rebol/rebol-issues/issues/1152
You can’t perform that action at this time.
0 commit comments