aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
diff options
context:
space:
mode:
Diffstat (limited to 'toys/pending')
-rw-r--r--toys/pending/bc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/pending/bc.c b/toys/pending/bc.c
index 5d0e98e9..2d927551 100644
--- a/toys/pending/bc.c
+++ b/toys/pending/bc.c
@@ -1197,7 +1197,7 @@ ssize_t bc_num_cmp(BcNum *a, BcNum *b) {
a_int -= b_int;
a_max = (a->rdx > b->rdx);
- if (a_int) return (ssize_t) a_int;
+ if (a_int) return neg ? -((ssize_t) a_int) : (ssize_t) a_int;
if (a_max) {
min = b->rdx;