mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Fix bug 77403
This commit is contained in:
@ -212,7 +212,7 @@ public:
|
||||
void Offset(const PointF_T<T>& point) { Offset(point.X, point.Y); }
|
||||
void Offset(T dx, T dy) { X += dx; Y += dy; }
|
||||
|
||||
inline bool IsPositive() { return X >= 0 && Y >= 0 && Width > 0 && Height > 0; }
|
||||
inline bool IsPositive() { return Width > 0 && Height > 0; }
|
||||
|
||||
public:
|
||||
T X, Y, Width, Height;
|
||||
|
||||
@ -1070,10 +1070,12 @@ unsigned int CPictFile::ReadLongValue()
|
||||
|
||||
bool CPictFile::ReadRectangle(Aggplus::Rect* rect)
|
||||
{
|
||||
rect->Y = ReadShortValue();
|
||||
rect->X = ReadShortValue();
|
||||
rect->Height = ReadShortValue() - rect->Y;
|
||||
rect->Width = ReadShortValue() - rect->X;
|
||||
rect->Y = (short) ReadShortValue();
|
||||
rect->X = (short) ReadShortValue();
|
||||
short bottom = (short) ReadShortValue();
|
||||
short right = (short) ReadShortValue();
|
||||
rect->Height = bottom - rect->Y;
|
||||
rect->Width = right - rect->X;
|
||||
|
||||
if (feof(m_pFile) != 0)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user