Kaydet (Commit) 7ea7ae16 authored tarafından David Tardon's avatar David Tardon

coverity#1202818 improper use of negative value

Change-Id: I2b5fed2f9f9d6a4aa6a8087843fa1805c2d1ffe4
üst c9e2ce54
...@@ -2533,12 +2533,15 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam) ...@@ -2533,12 +2533,15 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam)
{ {
sRuby = sPart.copy(nBegin+1,nEnd-nBegin-1); sRuby = sPart.copy(nBegin+1,nEnd-nBegin-1);
} }
if (-1 == if (-1 != nEnd)
(nBegin = sPart.indexOf(',',nEnd)))
{ {
nBegin = sPart.indexOf(';',nEnd); if (-1 ==
(nBegin = sPart.indexOf(',',nEnd)))
{
nBegin = sPart.indexOf(';',nEnd);
}
nEnd = sPart.lastIndexOf(')');
} }
nEnd = sPart.lastIndexOf(')');
if ((nBegin != -1) && (nEnd != -1)) if ((nBegin != -1) && (nEnd != -1))
{ {
sText = sPart.copy(nBegin+1,nEnd-nBegin-1); sText = sPart.copy(nBegin+1,nEnd-nBegin-1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment