aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox/busybox-bc.patch
blob: 465e798405b4ba37d669650b2f09079d6a9399e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/miscutils/bc.c	2019-11-21 12:59:36.007348161 +0000
+++ b/miscutils/bc.c	2019-11-21 17:05:22.192565550 +0000
@@ -1465,7 +1465,7 @@
 	b_int = BC_NUM_INT(b);
 	a_int -= b_int;
 
-	if (a_int != 0) return (ssize_t) a_int;
+	if (a_int != 0) return neg ? - (ssize_t) a_int : (ssize_t) a_int;
 
 	a_max = (a->rdx > b->rdx);
 	if (a_max) {