Skip to content

Commit

Permalink
smurf: Skip bad tile values in initial region mesh
Browse files Browse the repository at this point in the history
This commit prevents bad values being stored in the KeyMap
used by smf_jsatiles_region if they are present in the
initial mesh of tile numbers.  This prevents an error when
the values are subsequently fetched from the KeyMap
and passed to smf_jsatilei2xy.
  • Loading branch information
grahambell committed Oct 31, 2013
1 parent 5a515ff commit 2ca8f2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions applications/smurf/libsmf/smf_jsatiles_region.c
Expand Up @@ -187,8 +187,10 @@ int *smf_jsatiles_region( AstRegion *region, smf_inst_t instrument,
ix = (int)( *(xmesh++) + 0.5 ) - 1;
iy = (int)( *(ymesh++) + 0.5 ) - 1;
itile = smf_jsatilexy2i( ix, iy, &skytiling, status );
sprintf( text, "%d", itile );
astMapPut0I( km, text, 1, NULL );
if (itile != VAL__BADI) {
sprintf( text, "%d", itile );
astMapPut0I( km, text, 1, NULL );
}
}

/* Starting with the oldest entry in the KeyMap, loop round checking all
Expand Down

0 comments on commit 2ca8f2f

Please sign in to comment.