diff options
author | David Tardon <dtardon@redhat.com> | 2014-04-19 18:49:48 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-04-19 22:30:19 +0200 |
commit | 45a11701ffd18a1c616bbe7ebf36335d85db9c07 (patch) | |
tree | 13c0e475ddedf1be100570cfc46bcea3c9e01160 /sw/source/filter/ww8 | |
parent | 7ea7ae1699d5b6c6a09d9227fd072868e58feb89 (diff) |
make sure nEnd is after nBegin
Change-Id: Ic3cf41b21755c5f1e795ed3acb97ff83512b7613
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/ww8par5.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 2d83ee4f1414..95b4b3b0da64 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2529,7 +2529,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam) sal_Int32 nEnd = sPart.indexOf(')'); if ((nBegin != -1) && - (nEnd != -1)) + (nEnd != -1) && (nBegin < nEnd)) { sRuby = sPart.copy(nBegin+1,nEnd-nBegin-1); } @@ -2542,7 +2542,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam) } nEnd = sPart.lastIndexOf(')'); } - if ((nBegin != -1) && (nEnd != -1)) + if ((nBegin != -1) && (nEnd != -1) && (nBegin < nEnd)) { sText = sPart.copy(nBegin+1,nEnd-nBegin-1); } |