mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed a crash when entering an integer value outside the limits
This commit is contained in:
parent
f98ef07b51
commit
706a6e1beb
@ -145,6 +145,7 @@ Stefan Huelswitt <huels@iname.com>
|
|||||||
option can't be accessed
|
option can't be accessed
|
||||||
for implementing several replay modes to allow players that play only audio
|
for implementing several replay modes to allow players that play only audio
|
||||||
for improving cCondVar::Wait() and implementing cCondVar::TimedWait()
|
for improving cCondVar::Wait() and implementing cCondVar::TimedWait()
|
||||||
|
for reporting a bug when entering an integer value outside the limit
|
||||||
|
|
||||||
Ulrich Röder <roeder@efr-net.de>
|
Ulrich Röder <roeder@efr-net.de>
|
||||||
for pointing out that there are channels that have a symbol rate higher than
|
for pointing out that there are channels that have a symbol rate higher than
|
||||||
|
2
HISTORY
2
HISTORY
@ -1456,3 +1456,5 @@ Video Disk Recorder Revision History
|
|||||||
that are currently not available (for instance because all devices are
|
that are currently not available (for instance because all devices are
|
||||||
recording and these channels are on different transponders).
|
recording and these channels are on different transponders).
|
||||||
- Implemented an SPU decoder (thanks to Andreas Schultz).
|
- Implemented an SPU decoder (thanks to Andreas Schultz).
|
||||||
|
- Fixed a crash when entering an integer value outside the limits (thanks to
|
||||||
|
Stefan Huelswitt for reporting this one).
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menuitems.c 1.8 2002/08/15 11:27:57 kls Exp $
|
* $Id: menuitems.c 1.9 2002/09/08 14:51:28 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menuitems.h"
|
#include "menuitems.h"
|
||||||
@ -68,7 +68,7 @@ eOSState cMenuEditIntItem::ProcessKey(eKeys Key)
|
|||||||
*value = 0;
|
*value = 0;
|
||||||
fresh = false;
|
fresh = false;
|
||||||
}
|
}
|
||||||
newValue = *value * 10 + (Key - k0);
|
newValue = *value * 10 + (Key - k0);
|
||||||
}
|
}
|
||||||
else if (NORMALKEY(Key) == kLeft) { // TODO might want to increase the delta if repeated quickly?
|
else if (NORMALKEY(Key) == kLeft) { // TODO might want to increase the delta if repeated quickly?
|
||||||
newValue = *value - 1;
|
newValue = *value - 1;
|
||||||
@ -78,8 +78,11 @@ eOSState cMenuEditIntItem::ProcessKey(eKeys Key)
|
|||||||
newValue = *value + 1;
|
newValue = *value + 1;
|
||||||
fresh = true;
|
fresh = true;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
|
if (*value < min) { *value = min; Set(); }
|
||||||
|
if (*value > max) { *value = max; Set(); }
|
||||||
return state;
|
return state;
|
||||||
|
}
|
||||||
if ((!fresh || min <= newValue) && newValue <= max) {
|
if ((!fresh || min <= newValue) && newValue <= max) {
|
||||||
*value = newValue;
|
*value = newValue;
|
||||||
Set();
|
Set();
|
||||||
|
Loading…
Reference in New Issue
Block a user