summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-07-10 19:10:49 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-07-10 19:13:18 +0200
commit62342abac0e3a38e39a50b7560f09cbdeb62905a (patch)
treeb55138e4df4ea7a339bfb51fbb35b166be0552f7 /l10ntools
parent79e9a64299d7fb5abafdde5502093b899f36193a (diff)
fdo#51954: -1 is small while STRING_NOTFOUND was great
...after String -> rtl::OUString conversion in a4cbcf2fc567393cd954d0fcc8ea0ce7d859b59f. Change-Id: Ieb6dfce8c0cf7d8b5971d187b3b58b754c1cb02f
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/tagtest.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/l10ntools/source/tagtest.cxx b/l10ntools/source/tagtest.cxx
index e31faa452a6b..2a29c3f59e6f 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)