diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-11-26 13:55:38 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-11-26 13:55:38 +0100 |
commit | 71ccb6acb62fed319367fc71108d5b3fff8f3a5b (patch) | |
tree | 198f7a4d2177feb495304973b0c74208cc6e782d /PLUGINS/src/skincurses/skincurses.c | |
parent | 3a97be4fe96792f19674630edac762ae5a060b90 (diff) | |
download | vdr-71ccb6acb62fed319367fc71108d5b3fff8f3a5b.tar.gz vdr-71ccb6acb62fed319367fc71108d5b3fff8f3a5b.tar.bz2 |
Fixed SetProgress() in the 'skincurses' plugin in case Total is 0
Diffstat (limited to 'PLUGINS/src/skincurses/skincurses.c')
-rw-r--r-- | PLUGINS/src/skincurses/skincurses.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/PLUGINS/src/skincurses/skincurses.c b/PLUGINS/src/skincurses/skincurses.c index ad1a26b4..522d7cfc 100644 --- a/PLUGINS/src/skincurses/skincurses.c +++ b/PLUGINS/src/skincurses/skincurses.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: skincurses.c 1.6 2005/05/16 10:45:12 kls Exp $ + * $Id: skincurses.c 1.7 2005/11/26 13:52:39 kls Exp $ */ #include <ncurses.h> @@ -11,7 +11,7 @@ #include <vdr/plugin.h> #include <vdr/skins.h> -static const char *VERSION = "0.0.4"; +static const char *VERSION = "0.0.5"; static const char *DESCRIPTION = "A text only skin"; static const char *MAINMENUENTRY = NULL; @@ -500,7 +500,7 @@ void cSkinCursesDisplayReplay::SetMode(bool Play, bool Forward, int Speed) void cSkinCursesDisplayReplay::SetProgress(int Current, int Total) { - int p = OsdWidth * Current / Total; + int p = Total > 0 ? OsdWidth * Current / Total : 0; osd->DrawRectangle(0, 1, p, 1, clrGreen); osd->DrawRectangle(p, 1, OsdWidth, 1, clrWhite); } |