Fix bug 77403

This commit is contained in:
Prokhorov Kirill
2025-10-07 21:19:55 +03:00
parent a42310d2c5
commit e640331750
2 changed files with 7 additions and 5 deletions

View File

@ -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;

View File

@ -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;