summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-05-15 11:46:30 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2011-05-15 11:46:30 +0200
commit464552dd91a170f5e6c69650a6df1af871a2ad1a (patch)
treee074ebe09c11608a422e2be39577d4ef3d257359 /tools.c
parent914b04c1d23fe94c22de79cc34c62b7a26bac22c (diff)
downloadvdr-464552dd91a170f5e6c69650a6df1af871a2ad1a.tar.gz
vdr-464552dd91a170f5e6c69650a6df1af871a2ad1a.tar.bz2
Fixed cString's operator=(const char *String) in case the given string is the same as the existing one
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index a493529d..6a98bf69 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 2.13 2011/03/20 15:20:00 kls Exp $
+ * $Id: tools.c 2.14 2011/04/29 14:51:14 kls Exp $
*/
#include "tools.h"
@@ -906,6 +906,8 @@ cString &cString::operator=(const cString &String)
cString &cString::operator=(const char *String)
{
+ if (s == String)
+ return *this;
free(s);
s = String ? strdup(String) : NULL;
return *this;