summaryrefslogtreecommitdiff
path: root/math/ordCalc/patches/patch-ac
blob: 48915ffad63c09394929d4ca835eceeb44649fb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$NetBSD: patch-ac,v 1.2 2017/02/14 21:27:04 joerg Exp $

Pointers are not ordered. Fix the code to actually compare to the element
and not a promoted boolean.

--- src/ordinal.cpp.orig	2010-01-17 04:51:35.000000000 +0000
+++ src/ordinal.cpp
@@ -1341,7 +1341,7 @@ static void limitElementComboTest(const 
 	}
 }
 
-OutStream::OutStream():currentStream(&cerr),debugStream(0)
+OutStream::OutStream():currentStream(&cout),debugStream(0)
 {
 }
 
@@ -1420,7 +1420,7 @@ const Ordinal& ord::finiteFunctionalTest
 		if (params[index]->getImpl().psuedoCodeLevel() ==
 			CantorNormalElement::cantorCodeLevel) continue ;
 		if (maxIndex < 0) maxIndex = index ;
-		else if (params[maxIndex]->compare(params[index]<0)) maxIndex = index ;
+		else if (params[maxIndex]->compare(*params[index]) < 0) maxIndex = index ;
 	}
 	if (maxIndex >= 0) {
 		bool maxPredNz = false ;