make sure nEnd is after nBegin
Change-Id: Ic3cf41b21755c5f1e795ed3acb97ff83512b7613
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user