diff options
Diffstat (limited to 'src/mergesort.c')
-rw-r--r-- | src/mergesort.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mergesort.c b/src/mergesort.c index 1b21db7..053e702 100644 --- a/src/mergesort.c +++ b/src/mergesort.c @@ -7,6 +7,7 @@ #include "defs.h" #include "stream.h" #include "mergesort.h" +#include "util.h" static int merge(struct stream * const dest, struct stream * const A, struct stream * const B); @@ -53,7 +54,7 @@ static int merge(struct stream * const dest, struct stream * const A, struct str b = B->get(B); while (a || b) { - if (a && (!b || a->val <= b->val)) { + if (a && (!b || is_less_equal(a->val, b->val))) { dest->put(dest, a); a = A->get(A); } else { |