[MPlayer-cvslog] r35456 - trunk/gui/ui/render.c

ib subversion at mplayerhq.hu
Fri Nov 23 13:30:44 CET 2012


Author: ib
Date: Fri Nov 23 13:30:44 2012
New Revision: 35456

Log:
Prevent floating point exception.

In case of a dynamic label with no text and width zero
there will be a modulo by zero.

Modified:
   trunk/gui/ui/render.c

Modified: trunk/gui/ui/render.c
==============================================================================
--- trunk/gui/ui/render.c	Fri Nov 23 13:08:56 2012	(r35455)
+++ trunk/gui/ui/render.c	Fri Nov 23 13:30:44 2012	(r35456)
@@ -388,7 +388,7 @@ void RenderAll(wsTWindow *window, wItem 
                 char c[2];
 
                 l    = (item->textwidth ? item->textwidth : item->width);
-                x    = l - ((d - DLABEL_DELAY) / 20) % l - 1;
+                x    = (l ? l - ((d - DLABEL_DELAY) / 20) % l - 1 : 0);
                 c[0] = *item->text;
                 c[1] = '\0';
 


More information about the MPlayer-cvslog mailing list