summaryrefslogtreecommitdiff
path: root/usr.bin/dc
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2005-09-25 19:02:39 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2005-09-25 19:02:39 +0000
commit18036503473d1903fdff53d6356e68774db302a2 (patch)
tree6c181ec7e1abfa9de0cea57cea740e0cbf0e0a70 /usr.bin/dc
parent403f8bc3f8bf82c1b4daf28866c06311d94c1a81 (diff)
Fix wrong normalization in compare. From andreas@
Diffstat (limited to 'usr.bin/dc')
-rw-r--r--usr.bin/dc/bcode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c
index bdf6b6273fb..d09f3cd9dfb 100644
--- a/usr.bin/dc/bcode.c
+++ b/usr.bin/dc/bcode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcode.c,v 1.29 2005/04/02 18:05:04 otto Exp $ */
+/* $OpenBSD: bcode.c,v 1.30 2005/09/25 19:02:38 otto Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
@@ -17,7 +17,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: bcode.c,v 1.29 2005/04/02 18:05:04 otto Exp $";
+static const char rcsid[] = "$OpenBSD: bcode.c,v 1.30 2005/09/25 19:02:38 otto Exp $";
#endif /* not lint */
#include <ssl/ssl.h>
@@ -1448,7 +1448,7 @@ compare_numbers(enum bcode_compare type, struct number *a, struct number *b)
if (scale > a->scale)
normalize(a, scale);
- else if (scale > scale)
+ else if (scale > b->scale)
normalize(b, scale);
cmp = BN_cmp(a->number, b->number);