diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-09-19 17:42:51 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-09-19 17:42:51 (GMT) |
commit | 25afb555d0b6f5e257a3706e38b3da827b88bbda (patch) | |
tree | c58754a7c88fbd999a3ef07c09433bd3bec021b5 /tksao/frame | |
parent | d4bab727213e076cf8b3523f414c7d43623a556e (diff) | |
download | blt-25afb555d0b6f5e257a3706e38b3da827b88bbda.zip blt-25afb555d0b6f5e257a3706e38b3da827b88bbda.tar.gz blt-25afb555d0b6f5e257a3706e38b3da827b88bbda.tar.bz2 |
WCS: fix a memory ref with short axes symbols (aka 'b')
Diffstat (limited to 'tksao/frame')
-rw-r--r-- | tksao/frame/fitsimage.C | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C index 1b653b8..3daaa5d 100644 --- a/tksao/frame/fitsimage.C +++ b/tksao/frame/fitsimage.C @@ -3073,19 +3073,20 @@ void FitsImage::scanWCS(FitsHead* hd) ostringstream str; str << "Symbol(" << jj+1 << ")" << ends; const char* ss = astGetC(ff, str.str().c_str()); + size_t lss = strlen(ss); // cerr << "Symbol: " << ss << endl; if (ss) { if (!strcmp(ss,"RA") || !strcmp(ss,"l") || !strcmp(ss,"Lambda") || - !strcmp(ss+1,"LON") || - !strcmp(ss+2,"LN")) + (lss>1 && !strcmp(ss+1,"LON")) || + (lss>2 && !strcmp(ss+2,"LN"))) wcsCelLon_[ii] = jj+1; else if (!strcmp(ss,"Dec") || !strcmp(ss,"b") || !strcmp(ss,"Beta") || - !strcmp(ss+1,"LAT") || - !strcmp(ss+2,"LT")) + (lss>1 && !strcmp(ss+1,"LAT")) || + (lss>2 && !strcmp(ss+2,"LT"))) wcsCelLat_[ii] = jj+1; } } |