Index: trunk/psLib/src/dataIO/psLookupTable.c
===================================================================
--- trunk/psLib/src/dataIO/psLookupTable.c	(revision 4321)
+++ 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;
     }
