From a1b89677b79aa17db78e8eee010dea280c0f92a0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 24 Jun 2014 12:01:55 +0100 Subject: coverity#982255 Operands don't affect result fVal started out as a double, but is now a sal_Int64 since commit 353607df2ed59f00ad67a74de29b3db662ea960a Author: Lars Langhans Date: Mon Oct 9 13:21:27 2000 +0000 #79269# convert to hyper doesn't use toDouble any longer so the comparison is always false Change-Id: Ib0b0a78ba3763fb6564219e69111de13b5afc870 --- stoc/source/typeconv/convert.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stoc/source') diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index d04621fce285..1a6a081c235f 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -398,7 +398,7 @@ sal_Int64 TypeConverter_Impl::toHyper( const Any& rAny, sal_Int64 min, sal_uInt6 "invalid STRING value!", Reference(), aDestinationClass, FailReason::IS_NOT_NUMBER, 0 ); } - nRet = (fVal > SAL_INT64_MAX ? (sal_Int64)(sal_uInt64)fVal : (sal_Int64)fVal); + nRet = fVal; if (fVal >= min && (fVal < 0 || ((sal_uInt64)fVal) <= max)) return nRet; throw CannotConvertException( -- cgit v1.2.3