summaryrefslogtreecommitdiff
path: root/menuitems.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-02-28 12:54:38 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-02-28 12:54:38 +0100
commit9887c0765bb2e2653dfc0325e8b6784084787102 (patch)
tree4ec50458d687de5f5a1172a0bb389e54d115e646 /menuitems.c
parent085b1c4ddaf859eaa75276bc3ebc083e87289b47 (diff)
downloadvdr-9887c0765bb2e2653dfc0325e8b6784084787102.tar.gz
vdr-9887c0765bb2e2653dfc0325e8b6784084787102.tar.bz2
cMenuEditIntItem now checks the given value and forces it to be between the given min and max limits
Diffstat (limited to 'menuitems.c')
-rw-r--r--menuitems.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/menuitems.c b/menuitems.c
index fab13ca4..7bd1605a 100644
--- a/menuitems.c
+++ b/menuitems.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menuitems.c 1.32 2006/02/12 10:31:08 kls Exp $
+ * $Id: menuitems.c 1.33 2006/02/28 12:53:37 kls Exp $
*/
#include "menuitems.h"
@@ -51,6 +51,10 @@ cMenuEditIntItem::cMenuEditIntItem(const char *Name, int *Value, int Min, int Ma
value = Value;
min = Min;
max = Max;
+ if (*value < min)
+ *value = min;
+ else if (*value > max)
+ *value = max;
Set();
}