Merge pull request 'Fix bug #69318' (#546) from fix/rtf into develop

Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/546
This commit is contained in:
Elena Subbotina
2025-11-27 08:12:46 +00:00

View File

@ -66,7 +66,19 @@ namespace DocFileFormat
if (structureLength > 0)
{
// this PLEX contains CPs and Elements
n = ((int)lcb - CP_LENGTH) / (structureLength + CP_LENGTH);
//n = ((int)lcb - CP_LENGTH) / (structureLength + CP_LENGTH);
int totalSize = (int)lcb - CP_LENGTH;
int elementSize = structureLength + CP_LENGTH;
if (elementSize > 0)
{
n = totalSize / elementSize;
if (totalSize % elementSize != 0)
{
n += 1;
}
}
}
else
{