diff options
Diffstat (limited to 'src/gui/widgets/emotepage.cpp')
-rw-r--r-- | src/gui/widgets/emotepage.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp index cbdd50cab..68d508a5a 100644 --- a/src/gui/widgets/emotepage.cpp +++ b/src/gui/widgets/emotepage.cpp @@ -129,8 +129,8 @@ int EmotePage::getIndexFromGrid(const int x, const int y) const if (x < 0 || x > width || y < 0 || y > mDimension.height) return -1; const int cols = width / emoteWidth; - const unsigned int index = (y / emoteHeight) * cols + (x / emoteWidth); - if (index >= mEmotes->size()) + const int index = (y / emoteHeight) * cols + (x / emoteWidth); + if (index >= static_cast<int>(mEmotes->size())) return -1; return index; } |