[AC] Cater to the fact that default face height might be 0

Michael Sperber sperber at informatik.uni-tuebingen.de
Sat Nov 18 13:17:54 EST 2006


This unbreaks run-temacs for me.

2006-11-18  Mike Sperber  <mike at xemacs.org>

	* window.c (window_pixel_height_to_char_height): Cater to the
	possibility that defheight may be 0.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
-------------- next part --------------
Index: src/window.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/window.c,v
retrieving revision 1.93
diff -u -r1.93 window.c
--- src/window.c	12 Nov 2006 13:40:09 -0000	1.93
+++ src/window.c	18 Nov 2006 18:15:13 -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.


More information about the XEmacs-Patches mailing list