summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-02-07 15:53:30 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-02-07 15:53:30 +0100
commit5b88d0bfac4568bc2a273f7d44d3298d2515dfac (patch)
tree077bb229d83ed39d65c64d1cf839815506e38519 /menu.c
parent8b57eacd1be8e62c7ebab94e660c98fe1bca58ba (diff)
downloadvdr-5b88d0bfac4568bc2a273f7d44d3298d2515dfac.tar.gz
vdr-5b88d0bfac4568bc2a273f7d44d3298d2515dfac.tar.bz2
Fixed setting an empty recording name or folder to a blank in the "Edit recording" menu
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/menu.c b/menu.c
index 6f942437..1635fa1f 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 3.44 2015/02/07 14:14:50 kls Exp $
+ * $Id: menu.c 3.45 2015/02/07 15:42:37 kls Exp $
*/
#include "menu.h"
@@ -2251,8 +2251,10 @@ eOSState cMenuPathEdit::Folder(void)
eOSState cMenuPathEdit::ApplyChanges(void)
{
- if (!*name)
+ if (!*name) {
*name = ' '; // name must not be empty!
+ name[1] = 0;
+ }
cString NewPath = *folder ? cString::sprintf("%s%c%s", folder, FOLDERDELIMCHAR, name) : name;
NewPath.CompactChars(FOLDERDELIMCHAR);
if (strcmp(NewPath, path)) {
@@ -2467,8 +2469,10 @@ eOSState cMenuRecordingEdit::ApplyChanges(void)
}
Modified = true;
}
- if (!*name)
+ if (!*name) {
*name = ' '; // name must not be empty!
+ name[1] = 0;
+ }
cString NewName = *folder ? cString::sprintf("%s%c%s", folder, FOLDERDELIMCHAR, name) : name;
NewName.CompactChars(FOLDERDELIMCHAR);
if (strcmp(NewName, recording->Name())) {