Changeset 16418 for trunk/Mars/mcore


Ignore:
Timestamp:
05/29/13 01:16:50 (11 years ago)
Author:
lyard
Message:
Fixed bugs from improvements
Location:
trunk/Mars/mcore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcore/factfits.h

    r16417 r16418  
    5757
    5858        int16_t *startCell = reinterpret_cast<int16_t*>(fBufferRow.data() + offset + fOffsetStartCellData);
    59         int16_t *data      = reinterpret_cast<int16_t*>(fBufferRow.data() + offset + fOffsetData);
     59
     60        const Pointers::iterator dtaIt = fPointers.find("Data");
     61        if (dtaIt == fPointers.end()) return true;
     62        int16_t *data      = reinterpret_cast<int16_t*>(dtaIt->second);
    6063
    6164        for (uint32_t i=0; i<1440*1024; i+=1024, startCell++)
  • trunk/Mars/mcore/zfits.h

    r16416 r16418  
    146146                //swap the bytes
    147147                int64_t tempValues[2] = {0,0};
    148                 revcpy<8>(reinterpret_cast<char*>(tempValues[0]), readBuf, 2);
     148                revcpy<8>(reinterpret_cast<char*>(&tempValues[0]), readBuf, 2);
    149149
    150150                //add catalog entry
     
    153153
    154154        //see if there is a gap before heap data
    155         fHeapOff = fTable.GetHeapShift();
     155        fHeapOff = tellg()+fTable.GetHeapShift();
    156156    }
    157157
     
    179179
    180180            //skip to the beginning of the tile
    181             seekg(fCatalog[currentCatRow][0].second, ios_base::cur);
     181            seekg(fHeapOff+fCatalog[currentCatRow][0].second);
    182182            read(fCompressedBuffer.data(), sizeToRead);
    183183
Note: See TracChangeset for help on using the changeset viewer.