diff options
author | HampusM <hampus@hampusmat.com> | 2022-07-02 15:08:57 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-07-02 15:08:57 +0200 |
commit | 33f5395f99cf5f93d2e782933129ed5fc2fde091 (patch) | |
tree | 75a6fdee2fd89649dfc63ac1b005c9def4f60fe5 /src/engine/data/bounds.cpp | |
parent | 578cf43e9c8384aab463aa2a33c5be00e46dc999 (diff) |
This will prevent heap-buffer-overflows from occuring when opening RLE files with pattern sizes exceeding the current terminal size
Diffstat (limited to 'src/engine/data/bounds.cpp')
-rw-r--r-- | src/engine/data/bounds.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/engine/data/bounds.cpp b/src/engine/data/bounds.cpp index bee98ba..ad67ad2 100644 --- a/src/engine/data/bounds.cpp +++ b/src/engine/data/bounds.cpp @@ -85,3 +85,8 @@ auto Bounds::operator-(const Bounds &rhs) const noexcept -> Bounds return new_bounds; } + +auto Bounds::operator>(const Bounds &rhs) const noexcept -> bool +{ + return (_width > rhs._width) || _height > rhs._height; +} |