l10ntools/source/tagtest.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 62342abac0e3a38e39a50b7560f09cbdeb62905a Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Jul 10 19:10:49 2012 +0200 fdo#51954: -1 is small while STRING_NOTFOUND was great ...after String -> rtl::OUString conversion in a4cbcf2fc567393cd954d0fcc8ea0ce7d859b59f. Change-Id: Ieb6dfce8c0cf7d8b5971d187b3b58b754c1cb02f diff --git a/l10ntools/source/tagtest.cxx b/l10ntools/source/tagtest.cxx index e31faa4..2a29c3f 100644 --- a/l10ntools/source/tagtest.cxx +++ b/l10ntools/source/tagtest.cxx @@ -772,13 +772,13 @@ rtl::OUString SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, s if (nStyle2StartPos == -1 && nStyle3StartPos == -1) return rtl::OUString(); // no more tokens - if ( nStyle4StartPos < nStyle2StartPos && nStyle4StartPos <= nStyle3StartPos ) // <= to make sure \\ is always handled first + if ( nStyle4StartPos != -1 && nStyle4StartPos < nStyle2StartPos && nStyle4StartPos <= nStyle3StartPos ) // <= to make sure \\ is always handled first { // Skip quoted Backslash nPos = nStyle4StartPos +2; return GetNextTokenString( rErrorList, rTagStartPos ); } - if ( nStyle2StartPos < nStyle3StartPos ) + if ( nStyle2StartPos != -1 && ( nStyle3StartPos == -1 || nStyle2StartPos < nStyle3StartPos ) ) { // test for $[ ... ] style tokens sal_Int32 nEndPos = aSource.indexOf(']', nStyle2StartPos); if (nEndPos == -1) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits