summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-26 10:47:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-26 12:14:42 +0000
commitec7d0a45cc1c6db0d5b0dce8c4d2a03d3156c45b (patch)
treed42219585c9d3b5330a81d7a681cd1b304805d50 /vcl
parentc58d4919f27e54a554a86439ae995dd758fe24c6 (diff)
coverity#1266465 Improper use of negative value
Change-Id: I21ca714a701f58aa413bc508eb1ad128ebb39e58
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/longcurr.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index 1393de0a589a..027fb39f0c41 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -85,6 +85,8 @@ static OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const
OUString aFractionStr = rLocaleDataWrapper.getNum( (long)aFraction, 0 );
sal_Int32 nSPos = aTemplate.indexOf( '1' );
+ if (nSPos == -1)
+ break;
if ( aFractionStr.getLength() == 1 )
aTemplate[ nSPos ] = aFractionStr[0];
else