mirror of
https://github.com/irssi/irssi.git
synced 2026-08-19 08:32:07 +02:00
check for negative bound
This commit is contained in:
parent
f0bd434eb0
commit
b33ce255a9
1 changed files with 3 additions and 0 deletions
|
|
@ -1263,6 +1263,7 @@ static void cmd_window_shrink(const char *data)
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
count = *data == '\0' ? 1 : atoi(data);
|
count = *data == '\0' ? 1 : atoi(data);
|
||||||
|
if (count < -INT_MAX) count = -INT_MAX;
|
||||||
|
|
||||||
mainwindow_grow_int(-count);
|
mainwindow_grow_int(-count);
|
||||||
}
|
}
|
||||||
|
|
@ -1277,6 +1278,7 @@ static void cmd_window_size(const char *data)
|
||||||
|
|
||||||
size -= WINDOW_MAIN(active_win)->height -
|
size -= WINDOW_MAIN(active_win)->height -
|
||||||
WINDOW_MAIN(active_win)->statusbar_lines;
|
WINDOW_MAIN(active_win)->statusbar_lines;
|
||||||
|
if (size < -INT_MAX) size = -INT_MAX;
|
||||||
|
|
||||||
mainwindow_grow_int(size);
|
mainwindow_grow_int(size);
|
||||||
}
|
}
|
||||||
|
|
@ -1460,6 +1462,7 @@ static void cmd_window_rshrink(const char *data)
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
count = *data == '\0' ? 1 : atoi(data);
|
count = *data == '\0' ? 1 : atoi(data);
|
||||||
|
if (count < -INT_MAX) count = -INT_MAX;
|
||||||
|
|
||||||
window_rgrow_int(-count);
|
window_rgrow_int(-count);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue