Index: trunk/psLib/src/sys/psString.c
===================================================================
--- trunk/psLib/src/sys/psString.c	(revision 12286)
+++ 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
