IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19286


Ignore:
Timestamp:
Aug 29, 2008, 11:01:16 AM (18 years ago)
Author:
bills
Message:

avoid going past the end of an image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotSourceSize.c

    r18870 r19286  
    178178            // for each of the neighboring rows, mark the high pixels if they have a marked neighbor
    179179            // first go up:
    180             for (int iy = yo; iy >= 0; iy--) {
     180            for (int iy = PS_MIN(yo, mask->numRows-2); iy >= 0; iy--) {
    181181                // mark the pixels in this row to the left, then the right
    182182                for (int ix = 0; ix < pixels->numCols; ix++) {
     
    194194            }
    195195            // next go down:
    196             for (int iy = yo+1; iy < pixels->numRows; iy++) {
     196            for (int iy = PS_MIN(yo+1, mask->numRows-1); iy < pixels->numRows; iy++) {
    197197                // mark the pixels in this row to the left, then the right
    198198                for (int ix = 0; ix < pixels->numCols; ix++) {
Note: See TracChangeset for help on using the changeset viewer.