Mercurial > mplayer.hg
changeset 35362:848ca0b6d5ca
Prevent floating point exception.
In case of a dynamic label with no text and width zero
there will be a modulo by zero.
author | ib |
---|---|
date | Fri, 23 Nov 2012 12:30:44 +0000 |
parents | 3e8dcfa3ceef |
children | f1018a8029b2 |
files | gui/ui/render.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/ui/render.c Fri Nov 23 12:08:56 2012 +0000 +++ b/gui/ui/render.c Fri Nov 23 12:30:44 2012 +0000 @@ -388,7 +388,7 @@ 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';