summaryrefslogtreecommitdiff
blob: a36d2b7f8774904cdbddc251d9c62adeefaea53c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff -ru vdr-1.6.0-orig/menu.c vdr-1.6.0/menu.c
--- vdr-1.6.0-orig/menu.c	2009-06-04 10:55:14.481017158 +0200
+++ vdr-1.6.0/menu.c	2009-06-04 10:57:12.690998810 +0200
@@ -777,14 +777,14 @@
         }
 #endif /* PINPLUGIN */
 #ifdef USE_LIEMIEXT
-     char* p = strrchr(data.file, '~');
+     const char* p = strrchr(data.file, '~');
      if (p) {
         p++;
         Utf8Strn0Cpy(name, p, sizeof(name));
         Utf8Strn0Cpy(path, data.file, sizeof(path));
-        p = strrchr(path, '~');
-        if (p)
-           p[0] = 0;
+        char *p2 = strrchr(path, '~');
+        if (p2)
+           p2[0] = 0;
         }
      else {
         Utf8Strn0Cpy(name, data.file, sizeof(name));
diff -ru vdr-1.6.0-orig/videodir.c vdr-1.6.0/videodir.c
--- vdr-1.6.0-orig/videodir.c	2009-06-04 10:55:14.477693736 +0200
+++ vdr-1.6.0/videodir.c	2009-06-04 10:55:24.531019647 +0200
@@ -199,9 +199,10 @@
 #ifdef USE_HARDLINKCUTTER
 static bool StatNearestDir(const char *FileName, struct stat *Stat)
 {
-  cString Name(FileName);
+  char *Name = strdup(FileName);
+  cString Name_str(Name, true); /* manage free for us */
   char *p;
-  while ((p = strrchr((const char*)Name + 1, '/')) != NULL) {
+  while ((p = strrchr(Name + 1, '/')) != NULL) {
         *p = 0; // truncate at last '/'
         if (stat(Name, Stat) == 0) {
            isyslog("StatNearestDir: Stating %s", (const char*)Name);