IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 22, 2005, 5:19:29 PM (21 years ago)
Author:
desonia
Message:

modified psLookupTableRead to take a long indexCol and added check for
an invalidly large indexCol for psLookupTableImport.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataIO/psLookupTable.c

    r4321 r4366  
    77*  @author Ross Harman, MHPCC
    88*
    9 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2005-06-20 22:42:29 $
     9*  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2005-06-23 03:19:29 $
    1111*
    1212*  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    548548}
    549549
    550 psLookupTable *psLookupTableImport(psLookupTable *table, const psArray *vectors, int indexCol)
     550psLookupTable *psLookupTableImport(psLookupTable *table, const psArray *vectors, long indexCol)
    551551{
    552552    psLookupTable* outputTable = NULL;
     
    564564    if(indexCol < 0 ) {
    565565        psError(PS_ERR_BAD_PARAMETER_VALUE,true,"Index column cannot be less than zero");
     566        return NULL;
     567    }
     568
     569    if (indexCol >= vectors->n) {
     570        psError(PS_ERR_BAD_PARAMETER_VALUE,true,"Index column, %d, is larger than number of columns, %d.",
     571                indexCol, vectors->n);
    566572        return NULL;
    567573    }
Note: See TracChangeset for help on using the changeset viewer.