aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/StringUtil.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StringUtil.cc b/src/StringUtil.cc
index ba5f58d..a85735a 100644
--- a/src/StringUtil.cc
+++ b/src/StringUtil.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: StringUtil.cc,v 1.6 2002/01/21 01:56:39 fluxgen Exp $ 22// $Id: StringUtil.cc,v 1.7 2002/01/27 12:46:28 fluxgen Exp $
23 23
24#include "StringUtil.hh" 24#include "StringUtil.hh"
25 25
@@ -67,7 +67,7 @@ char *StringUtil::expandFilename(const char *filename) {
67 67
68 auto_ptr<char> retval( new char[strlen(filename)+strlen(getenv("HOME"))+2]); 68 auto_ptr<char> retval( new char[strlen(filename)+strlen(getenv("HOME"))+2]);
69 if (filename[0]=='~') { 69 if (filename[0]=='~') {
70 strcat(retval.get(), getenv("HOME")); 70 strcpy(retval.get(), getenv("HOME"));
71 strcat(retval.get(), &filename[1]); 71 strcat(retval.get(), &filename[1]);
72 } else 72 } else
73 return StringUtil::strdup(filename); //return unmodified value 73 return StringUtil::strdup(filename); //return unmodified value