diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2011-05-15 11:46:30 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2011-05-15 11:46:30 +0200 |
commit | 464552dd91a170f5e6c69650a6df1af871a2ad1a (patch) | |
tree | e074ebe09c11608a422e2be39577d4ef3d257359 /tools.c | |
parent | 914b04c1d23fe94c22de79cc34c62b7a26bac22c (diff) | |
download | vdr-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |