summaryrefslogtreecommitdiff
path: root/sax/source
diff options
context:
space:
mode:
Diffstat (limited to 'sax/source')
-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 )