summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-02-11 10:09:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-02-11 12:11:43 +0000
commit110c193988a13541c165b126784ec2369ddf4f8c (patch)
treece5c36e01b6075cb89ddb53dca6e9f342c21c87f /sax
parent29eac263c50353d7ed0a4b9027e67c1e198b9072 (diff)
Related: #i97873# (coverity#705407) Improper use of negative value
a pity the other one wasn't fixed when the first one was fixed back in 2002 with 0645e6a1a1917fef833358f328b5d56396380698 Change-Id: Ia7ac0f57a6805dc8ff09668198d0530b1cfc31db
Diffstat (limited to 'sax')
-rw-r--r--sax/source/expatwrap/xml2utf.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx
index 865818308541..6e0f2e94019b 100644
--- a/sax/source/expatwrap/xml2utf.cxx
+++ b/sax/source/expatwrap/xml2utf.cxx
@@ -239,7 +239,7 @@ sal_Bool XMLFile2UTFConverter::scanForEncoding( Sequence< sal_Int8 > &seq )
}
int nFound = str.indexOf( " encoding" );
- if( nFound < str.getLength() ) {
+ if( nFound >= 0 ) {
int nStop;
int nStart = str.indexOf( "\"" , nFound );
if( nStart < 0 || str.indexOf( "'" , nFound ) < nStart )