Index: trunk/psLib/src/sys/psString.c
===================================================================
--- trunk/psLib/src/sys/psString.c	(revision 12513)
+++ trunk/psLib/src/sys/psString.c	(revision 12517)
@@ -13,6 +13,6 @@
  *  @author David Robbins, MHPCC
  *
- *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-07 00:17:48 $
+ *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-03-21 21:37:58 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -43,5 +43,5 @@
                          unsigned int lineno,
                          const char *func,
-                         long nChar)
+                         size_t nChar)
 {
     if (nChar < 1) {
@@ -85,5 +85,5 @@
                          const char *func,
                          const char *string,
-                         unsigned int nChar)
+                         size_t nChar)
 {
     // Pass through NULL values
@@ -93,8 +93,8 @@
 
     // Check the number of characters to copy is non-negative
-    if (nChar == UINT_MAX) {
+    if (nChar < 0) {
         // Log error message and return NULL
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                _("Can not copy a negative number of characters (%d)."),
+                _("Can not copy a negative number of characters (%zd)."),
                 nChar);
         return NULL;
@@ -102,6 +102,6 @@
 
     // Copy input string to memory allocated up to nChar characters
-    psString output = p_psStringAlloc(file, lineno, func, (size_t) nChar + 1);
-    output = strncpy(output, string, (size_t) nChar);
+    psString output = p_psStringAlloc(file, lineno, func, nChar + 1);
+    output = strncpy(output, string, nChar);
 
     // Ensure the last byte is NULL character
Index: trunk/psLib/src/sys/psString.h
===================================================================
--- trunk/psLib/src/sys/psString.h	(revision 12513)
+++ trunk/psLib/src/sys/psString.h	(revision 12517)
@@ -11,6 +11,6 @@
  * @author Joshua Hoblitt, University of Hawaii
  *
- * @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-03-07 22:30:23 $
+ * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2007-03-21 21:37:58 $
  *
  * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -46,5 +46,5 @@
 #ifdef DOXYGEN
 psString psStringAlloc(
-    long nChar                         ///< Size of psString to allocate.
+    size_t nChar                        ///< Size of psString to allocate.
 );
 #else // ifdef DOXYGEN
@@ -53,5 +53,5 @@
     unsigned int lineno,                ///< Line number of caller
     const char *func,                   ///< Function name of caller
-    long nChar                         ///< Size of psString to allocate.
+    size_t nChar                        ///< Size of psString to allocate.
 );
 #define psStringAlloc(nChar) \
@@ -110,6 +110,6 @@
 #ifdef DOXYGEN
 psString psStringNCopy(
-    const char *string,                ///< Input string of characters to copy
-    unsigned int nChar                 ///< Number of bytes to allocate for string copy
+    const char *string,                 ///< Input string of characters to copy
+    size_t nChar                        ///< Number of bytes to allocate for string copy
 );
 #else // ifdef DOXYGEN
@@ -119,5 +119,5 @@
     const char *func,                   ///< Function name of caller
     const char *string,                 ///< Input string of characters to copy
-    unsigned int nChar                  ///< Number of bytes to allocate for string copy
+    size_t nChar                        ///< Number of bytes to allocate for string copy
 );
 #define psStringNCopy(string, nChar) \
