summaryrefslogtreecommitdiff
path: root/sal/rtl/source/math.cxx
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2010-01-14 19:11:13 +0100
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2010-01-14 19:11:13 +0100
commitac27218d0d423c99fed81f7726ef0bb10d67c14e (patch)
treea8046e11a6fad9af2487ec0c4c26969be1316f25 /sal/rtl/source/math.cxx
parent98ff20e30873c73ca8ba3995fd0c959a1b28fc78 (diff)
parent6e8628fb7374b7d19e15f03e63f8ad221ca25f1e (diff)
rebase to DEV300_m69
Diffstat (limited to 'sal/rtl/source/math.cxx')
-rw-r--r--sal/rtl/source/math.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sal/rtl/source/math.cxx b/sal/rtl/source/math.cxx
index a255ca21b13a..012046c9e5c8 100644
--- a/sal/rtl/source/math.cxx
+++ b/sal/rtl/source/math.cxx
@@ -879,8 +879,13 @@ inline double stringToDouble(CharT const * pBegin, CharT const * pEnd,
rtl::math::setNan( &fVal );
if (bSign)
{
- reinterpret_cast< sal_math_Double * >(&fVal)->w32_parts.msw
- |= 0x80000000; // create negative NaN
+ union {
+ double sd;
+ sal_math_Double md;
+ } m;
+ m.sd = fVal;
+ m.md.w32_parts.msw |= 0x80000000; // create negative NaN
+ fVal = m.sd;
bSign = false; // don't negate again
}
// Eat any further digits: