Commit 4e9d18e1 authored by Behdad Esfahbod's avatar Behdad Esfahbod Committed by Behdad Esfahbod

Guard more against off values.

2006-02-11  Behdad Esfahbod  <behdad@gnome.org>

        * src/vte.c (_vte_invalidate_cells): Guard more against off values.
parent a4b4fa1c
2006-02-11 Behdad Esfahbod <behdad@gnome.org>
* src/vte.c (_vte_invalidate_cells): Guard more against off values.
2006-02-10 Behdad Esfahbod <behdad@gnome.org>
Update the build infrastructure. make distcheck works now!
......
......@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vte\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-02-10 21:32-0500\n"
"POT-Creation-Date: 2006-02-11 00:04-0500\n"
"PO-Revision-Date: 2004-01-03 20:07+0330\n"
"Last-Translator: Roozbeh Pournader <roozbeh@sharif.edu>\n"
"Language-Team: Persian <farsi@lists.sharif.edu>\n"
......
......@@ -243,13 +243,13 @@ _vte_invalidate_cells(VteTerminal *terminal,
row_start -= terminal->pvt->screen->scroll_delta;
/* Clamp the start values to reasonable numbers. */
i = row_start;
row_start = (row_start > 0) ? row_start : 0;
row_count = (i + row_count) - row_start;
i = MIN (row_start + row_count, terminal->row_count);
row_start = MAX (0, row_start);
row_count = MAX (0, i - row_start);
i = column_start;
column_start = (column_start > 0) ? column_start : 0;
column_count = (i + column_count) - column_start;
i = MIN (column_start + column_count, terminal->column_count);
column_start = MAX (0, column_start);
column_count = MAX (0, i - column_start);
/* Convert the column and row start and end to pixel values
* by multiplying by the size of a character cell. */
......@@ -267,7 +267,7 @@ _vte_invalidate_cells(VteTerminal *terminal,
rect.y = row_start * terminal->char_height + VTE_PAD_WIDTH;
rect.height = row_count * terminal->char_height;
if (rect.y == 0) {
if (row_start == 0) {
/* Include the top border. */
rect.y -= VTE_PAD_WIDTH;
rect.height += VTE_PAD_WIDTH;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment