changeset 3687:719ceea8b3cb

[xemacs-hg @ 2006-11-18 18:17:53 by michaels] 2006-11-18 Mike Sperber <mike@xemacs.org> * window.c (window_pixel_height_to_char_height): Cater to the possibility that defheight may be 0.
author michaels
date Sat, 18 Nov 2006 18:17:55 +0000
parents 5bab930875e2
children a7268f221ac4
files src/ChangeLog src/window.c
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Nov 17 22:51:06 2006 +0000
+++ b/src/ChangeLog	Sat Nov 18 18:17:55 2006 +0000
@@ -1,3 +1,8 @@
+2006-11-18  Mike Sperber  <mike@xemacs.org>
+
+	* window.c (window_pixel_height_to_char_height): Cater to the
+	possibility that defheight may be 0.
+
 2006-11-15  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* mule-charset.c:
--- a/src/window.c	Fri Nov 17 22:51:06 2006 +0000
+++ b/src/window.c	Sat Nov 18 18:17:55 2006 +0000
@@ -4107,7 +4107,7 @@
 {
   int avail_height;
   int defheight, defwidth;
-  int char_height;
+  int char_height = 0;
   Lisp_Object window = wrap_window (w);
 
 
@@ -4118,7 +4118,8 @@
 
   default_face_height_and_width (window, &defheight, &defwidth);
 
-  char_height = avail_height / defheight;
+  if (defheight)
+    char_height = avail_height / defheight;
 
   /* It's the calling function's responsibility to check these values
      and make sure they're not out of range.