From c53812a1b7c45b1b5a4a341b178c40602c7dcbf7 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 20 May 2012 15:25:00 +0200 Subject: Some cppcheck cleaning Change-Id: Ic30cdeffabec1eb1a6c153ac450a3d28064ef534 --- svtools/source/svhtml/parhtml.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'svtools/source/svhtml') diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 1c5b350b4406..d1c588cd5e81 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -1966,8 +1966,7 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader, // somewhere in the first 80 characters of the document nStart = sCmp.indexOfL(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_html)); - if( nStart != -1 && - nStart>0 && '<'==sCmp[nStart-1] && + if( nStart>0 && '<'==sCmp[nStart-1] && nStart+4 < sCmp.getLength() && '>'==sCmp[nStart+4] ) return true; -- cgit