aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 26d0ef6..9983561 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -31,7 +31,7 @@ void rectangle::fit(unsigned long to_width, unsigned long to_height)
{
// fit rect within (to_width x to_height)
- if (to_width <= width()) {
+ if (to_width <= (unsigned long)width()) {
// scale to fit with
set_bottom(top() + (static_cast<long>(to_width) * height() / width()) - 1);
set_right(left() + to_width - 1);