[gnumeric] make sure that printareas are sane before using them
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] make sure that printareas are sane before using them
- Date: Wed, 1 Jul 2009 04:24:13 +0000 (UTC)
commit 5611f542ba80e04e31b03ac3f144824a07e8d514
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Tue Jun 30 22:23:35 2009 -0600
make sure that printareas are sane before using them
2009-06-30 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/sheet.c (sheet_get_nominal_printarea): make sure the
range is sane
ChangeLog | 5 +++++
src/sheet.c | 4 ++++
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a1899f9..30e79de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-30 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * src/sheet.c (sheet_get_nominal_printarea): make sure the
+ range is sane
+
2009-06-28 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/func-builtin.c (help_sum): change to new description type
diff --git a/src/sheet.c b/src/sheet.c
index 8170cd2..ab6548f 100644
--- a/src/sheet.c
+++ b/src/sheet.c
@@ -2080,6 +2080,10 @@ sheet_get_nominal_printarea (Sheet const *sheet)
r->end.col = max_cols - 1;
if (r->end.row >= (max_rows = gnm_sheet_get_max_rows (sheet)))
r->end.row = max_rows - 1;
+ if (r->start.col < 0)
+ r->start.col = 0;
+ if (r->start.row < 0)
+ r->start.row = 0;
return r;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]