Commit d0bb181d authored by Marco De Marco's avatar Marco De Marco
Browse files

Integrate NAXIS fix and TLOGIC fix on experimental branch

parent 2fd7c3d1
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -469,7 +469,7 @@ std::string WorkerThread::readKeyFromPHDU(CCfits::PHDU& phdu, std::string keyNam
            long axisReq = boost::lexical_cast<long>(matches[2]) - 1;

            if(axisReq<0 || axisReq>=axisMax)
                throw std::runtime_error("Invalid naxis number");
                throw CCfits::HDU::NoSuchKeyword("Invalid naxis number");

            resultStream << phdu.axis(axisReq);
        }
@@ -602,7 +602,13 @@ std::string WorkerThread::readKey(CCfits::HDU& hdu, std::string keyName,
                hdu.readKey(keyName, value);
                return value;
            }
            case TINT: case TSHORT: case TLOGICAL: case TSBYTE:
            case TLOGICAL:
            {
                bool value;
                hdu.readKey(keyName, value);
                return boost::lexical_cast<std::string>(value);
            }
            case TINT: case TSHORT: case TSBYTE:
            {
                int value = 0;
                hdu.readKey(keyName, value);