From c59a5b81e9521a92587e701bcad82bf643b00493 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 25 Nov 2018 16:31:42 +0300 Subject: tdf#120703 PVS: V560 A part of conditional expression is always true/false Change-Id: I8d98aa7dd77fbd79611b8a4aba77e8c378fd1cae Reviewed-on: https://gerrit.libreoffice.org/63981 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lingucomponent') diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index 01c587c60ec4..181d6a8bb0f4 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -381,7 +381,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo { int leftrep = 0; bool hit = (n >= minLen); - if (!rep || !rep[i] || (i >= n)) + if (!rep || !rep[i]) { hit = hit && (hyphens[i]&1) && (i < Leading); hit = hit && (i >= (minLead-1) ); @@ -407,7 +407,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo if (hit) { nHyphenationPos = i; - if (rep && (i < n) && rep[i]) + if (rep && rep[i]) { nHyphenationPosAlt = i - pos[i]; nHyphenationPosAltHyph = i + leftrep - pos[i]; -- cgit