Index: trunk/psLib/src/sys/psString.c
===================================================================
--- trunk/psLib/src/sys/psString.c	(revision 8232)
+++ trunk/psLib/src/sys/psString.c	(revision 8415)
@@ -13,6 +13,6 @@
  *  @author David Robbins, MHPCC
  *
- *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-08 23:32:23 $
+ *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-18 01:59:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -108,10 +108,8 @@
     }
 
-    if (!*dest) {
-        *dest = psStringCopy("");
+    if (*dest) {
+        oldLength = strlen(*dest);
+    } else {
         oldLength = 0;
-    } else {
-        // size of existing string
-        oldLength = strlen(*dest);
     }
 
@@ -128,9 +126,10 @@
     }
 
-    // new string length (sans \0)
-    length = oldLength + tailLength;
-
     // realloc string to string + tail + \0
-    *dest = psRealloc(*dest, length + 1);
+    if (*dest) {
+        *dest = psRealloc(*dest, oldLength + tailLength + 1);
+    } else {
+        *dest = psStringAlloc(oldLength + tailLength + 1);
+    }
 
     // append tail + \0
