IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16420


Ignore:
Timestamp:
Feb 12, 2008, 4:55:33 PM (18 years ago)
Author:
Paul Price
Message:

Adding trap for bad coordinates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmStack.c

    r15562 r16420  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2007-11-10 01:09:20 $
     10 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2008-02-13 02:55:33 $
    1212 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
    1313 *
     
    486486        for (int j = 0; j < pixels->n; j++) {
    487487            int x = pixels->data[j].x, y = pixels->data[j].y; // Coordinates of interest
     488            if (x < 0 || x >= numCols || y < 0 || y >= numRows) {
     489                psWarning("Bad pixel coordinate: %d,%d --- ignored.", x, y);
     490                continue;
     491            }
    488492            psArray *columns = map->data[y]; // The columns for that row
    489493            psVector *images = columns->data[x]; // The images for that column
Note: See TracChangeset for help on using the changeset viewer.