diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-23 10:12:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-23 14:16:02 +0100 |
commit | e8eb9e9557e9b31cbf80f0b3ff553ad921de8c1b (patch) | |
tree | 04567692e9e31f9707187ed053bc9ca9a4075707 | |
parent | efc9dffda369723f6fac5d508c48c57dffc5279b (diff) |
coverity#982428 Division or modulo by float zero
Change-Id: I2aee3d84387736195c29534761846f69d616753d
-rw-r--r-- | desktop/source/splash/splash.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index be9c07877e11..e268b163afbe 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -524,7 +524,7 @@ void SplashScreen::determineProgressRatioValues( Rectangle aScreenArea = Application::GetScreenPosSizePixel((unsigned int)0); nWidth = aScreenArea.GetWidth(); nHeight = aScreenArea.GetHeight(); - nScreenRatio = sal_Int32( math::round( double( nWidth ) / double( nHeight ), 2 ) * 100 ); + nScreenRatio = nHeight ? sal_Int32( math::round( double( nWidth ) / double( nHeight ), 2 ) * 100 ) : 0; } char szFullScreenProgressRatio[] = "FullScreenProgressRatio0"; |