[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mgp-users 01376] Re: Bug in magicpoint 1.11a?



Hi, 

From: "Juan M. Bello Rivas" <jmbr@openwall.net>
Subject: [mgp-users 01374] Bug in magicpoint 1.11a?
Date: Sun, 28 Nov 2004 23:36:45 +0100
Message-ID: <>

 > By using magicpoint 1.11a with the slide I attach to this mail the
 > screen goes blank and CPU usage skyrockets.  I'm not sure whether the
 > bug is in mgp or in some underlying X-related library.

Please try the following patch. Or, plaese don't use very long words. 

Thanks,
--
Yoshifumi Nishida
nishida@csl.sony.co.jp


*** draw.c.orig	2004-09-21 12:25:35.000000000 +0900
--- draw.c	2004-11-30 18:13:20.222679016 +0900
***************
*** 4761,4770 ****
--- 4761,4779 ----
  			if (state->width - state->leftfillpos / 2 - state->linewidth >= extents.xOff) goto nofolding;
  		}
  
+ #if 1
+ 		/* for very long words */
+         while(--len > 0){
+             XftTextExtents8(display, xft_font, (XftChar8 *)p, len, &extents);
+             if (state->width - state->leftfillpos / 2 - state->linewidth < extents.xOff)
+                 continue;
+         }
+ #else
  		draw_line_end(state); 
  	 	draw_line_start(state);
  		state->linewidth = state->leftfillpos;
  		return p;
+ #endif
  	}
  
  nofolding: