diff --git a/Makefile b/Makefile index 7547933..a52d569 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ CXXFLAGS := -std=c++11 -O3 \ -Wshadow \ -Wformat=2 \ -Wmissing-declarations \ - -Wstrict-overflow=4 \ + -Wstrict-overflow=5 \ -Wcast-align \ -Wcast-qual \ -Wconversion \ diff --git a/termite.cc b/termite.cc index 6f84207..bd2ca1a 100644 --- a/termite.cc +++ b/termite.cc @@ -13,6 +13,7 @@ #include #include "url_regex.hh" +#include "util/clamp.hh" #include "util/memory.hh" using namespace std::placeholders; @@ -292,8 +293,8 @@ static void move(VteTerminal *vte, select_info *select, long col, long row) { vte_terminal_get_cursor_position(vte, &cursor_col, &cursor_row); vte_terminal_set_cursor_position(vte, - CLAMP(cursor_col + col, 0, end_col), - CLAMP(cursor_row + row, first_row(vte), last_row(vte))); + clamp(cursor_col + col, 0l, end_col), + clamp(cursor_row + row, first_row(vte), last_row(vte))); update_scroll(vte); update_selection(vte, select); diff --git a/util b/util index 4d92489..f028ce5 160000 --- a/util +++ b/util @@ -1 +1 @@ -Subproject commit 4d9248982472c774ea539c4180a0f89103ebaec3 +Subproject commit f028ce5881f49f5435f4376dbb9ee840d18aef06