# HG changeset patch # User ib # Date 1353673844 0 # Node ID 848ca0b6d5ca8e2f0ba5cd33d4cb2f9ae22546a4 # Parent 3e8dcfa3ceef5e98380ba1e80f38dbe1f0092d08 Prevent floating point exception. In case of a dynamic label with no text and width zero there will be a modulo by zero. diff -r 3e8dcfa3ceef -r 848ca0b6d5ca gui/ui/render.c --- 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';