summaryrefslogtreecommitdiffstats
path: root/redhat/applications/koffice/kexi-fp_expressions-1.1.3.patch
blob: 9147ffad2b08faec33e4c78baef54186ee0280ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Index: kexi/kexidb/expression.cpp
===================================================================
--- kexi/kexidb/expression.cpp	(revision 742153)
+++ kexi/kexidb/expression.cpp	(working copy)
@@ -400,14 +400,10 @@
 	if (ltInt && rtInt)
 		return KexiDB::maximumForIntegerTypes(lt, rt);
 
-	if (Field::isFPNumericType(lt) && rtInt)
+	if (Field::isFPNumericType(lt) && (rtInt || lt==rt))
 		return lt;
-	if (Field::isFPNumericType(rt) && ltInt)
+	if (Field::isFPNumericType(rt) && (ltInt || lt==rt))
 		return rt;
-	if ((lt==Field::Double || lt==Field::Float) && rtInt)
-		return lt;
-	if ((rt==Field::Double || rt==Field::Float) && ltInt)
-		return rt;
 
 	return Field::Boolean;
 }