Index: /trunk/psLib/src/dataIO/psLookupTable.c
===================================================================
--- /trunk/psLib/src/dataIO/psLookupTable.c	(revision 4365)
+++ /trunk/psLib/src/dataIO/psLookupTable.c	(revision 4366)
@@ -7,6 +7,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-20 22:42:29 $
+*  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-23 03:19:29 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
@@ -548,5 +548,5 @@
 }
 
-psLookupTable *psLookupTableImport(psLookupTable *table, const psArray *vectors, int indexCol)
+psLookupTable *psLookupTableImport(psLookupTable *table, const psArray *vectors, long indexCol)
 {
     psLookupTable* outputTable = NULL;
@@ -564,4 +564,10 @@
     if(indexCol < 0 ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE,true,"Index column cannot be less than zero");
+        return NULL;
+    }
+
+    if (indexCol >= vectors->n) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE,true,"Index column, %d, is larger than number of columns, %d.",
+                indexCol, vectors->n);
         return NULL;
     }
Index: /trunk/psLib/src/dataIO/psLookupTable.h
===================================================================
--- /trunk/psLib/src/dataIO/psLookupTable.h	(revision 4365)
+++ /trunk/psLib/src/dataIO/psLookupTable.h	(revision 4366)
@@ -7,6 +7,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-20 22:42:29 $
+*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-23 03:19:29 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -30,5 +30,5 @@
     const char *filename;              ///< Name of file with table
     const char *format;                ///< scanf-like format string for file
-    unsigned int indexCol;             ///< Column of the index vector (starting at zero)
+    long indexCol;                     ///< Column of the index vector (starting at zero)
     psVector *index;                   ///< Vector of independent index values
     psArray *values;                   ///< Array of dependent table values corresponding to index values
@@ -91,7 +91,7 @@
  */
 psLookupTable *psLookupTableImport(
-    psLookupTable *table,            ///< Lookup table into which to import
-    const psArray *vectors,          ///< Array of vectors
-    int indexCol                     ///< Index of the index vector in the array of vectors
+    psLookupTable *table,              ///< Lookup table into which to import
+    const psArray *vectors,            ///< Array of vectors
+    long indexCol                      ///< Index of the index vector in the array of vectors
 );
 
Index: /trunk/psLib/src/types/psLookupTable.c
===================================================================
--- /trunk/psLib/src/types/psLookupTable.c	(revision 4365)
+++ /trunk/psLib/src/types/psLookupTable.c	(revision 4366)
@@ -7,6 +7,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-20 22:42:29 $
+*  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-23 03:19:29 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
@@ -548,5 +548,5 @@
 }
 
-psLookupTable *psLookupTableImport(psLookupTable *table, const psArray *vectors, int indexCol)
+psLookupTable *psLookupTableImport(psLookupTable *table, const psArray *vectors, long indexCol)
 {
     psLookupTable* outputTable = NULL;
@@ -564,4 +564,10 @@
     if(indexCol < 0 ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE,true,"Index column cannot be less than zero");
+        return NULL;
+    }
+
+    if (indexCol >= vectors->n) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE,true,"Index column, %d, is larger than number of columns, %d.",
+                indexCol, vectors->n);
         return NULL;
     }
Index: /trunk/psLib/src/types/psLookupTable.h
===================================================================
--- /trunk/psLib/src/types/psLookupTable.h	(revision 4365)
+++ /trunk/psLib/src/types/psLookupTable.h	(revision 4366)
@@ -7,6 +7,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-20 22:42:29 $
+*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-23 03:19:29 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -30,5 +30,5 @@
     const char *filename;              ///< Name of file with table
     const char *format;                ///< scanf-like format string for file
-    unsigned int indexCol;             ///< Column of the index vector (starting at zero)
+    long indexCol;                     ///< Column of the index vector (starting at zero)
     psVector *index;                   ///< Vector of independent index values
     psArray *values;                   ///< Array of dependent table values corresponding to index values
@@ -91,7 +91,7 @@
  */
 psLookupTable *psLookupTableImport(
-    psLookupTable *table,            ///< Lookup table into which to import
-    const psArray *vectors,          ///< Array of vectors
-    int indexCol                     ///< Index of the index vector in the array of vectors
+    psLookupTable *table,              ///< Lookup table into which to import
+    const psArray *vectors,            ///< Array of vectors
+    long indexCol                      ///< Index of the index vector in the array of vectors
 );
 
Index: /trunk/psLib/test/dataIO/tst_psLookupTable_01.c
===================================================================
--- /trunk/psLib/test/dataIO/tst_psLookupTable_01.c	(revision 4365)
+++ /trunk/psLib/test/dataIO/tst_psLookupTable_01.c	(revision 4366)
@@ -12,6 +12,6 @@
 *  @author  Ross Harman, MHPCC
 *
-*  @version $Revision: 1.15 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2005-05-31 21:52:49 $
+*  @version $Revision: 1.16 $  $Name: not supported by cvs2svn $
+*  @date  $Date: 2005-06-23 03:19:29 $
 *
 *  Copyright 2004-5 Maui High Performance Computing Center, University of Hawaii
@@ -621,5 +621,5 @@
 {
     psLookupTable*  table1  = NULL;
-    psS32           numRows = 0;
+    long           numRows = 0;
 
     // Attempt to read table with NULL input table specified
