Changeset 11027 for trunk/FACT++
- Timestamp:
- 06/15/11 11:01:24 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Converter.cc
r11026 r11027 856 856 } 857 857 858 858 // -------------------------------------------------------------------------- 859 // 860 //! @param dest 861 //! Array to which the destination data is written 862 //! @param src 863 //! Array with the source data according to the format stored in the 864 //! Converter 865 //! @param size 866 //! size of the destination data in bytes 867 //! 859 868 void Converter::ToFits(void *dest, const void *src, size_t size) const 860 869 { … … 870 879 for (Converter::FormatList::const_iterator i=fList.begin(); i!=fList.end(); i++) 871 880 { 872 if (charDest-size>dest )881 if (charDest-size>dest/* || charSrc-size>src*/) 873 882 { 874 883 ostringstream err; … … 883 892 if (type=='S') 884 893 { 885 size -= strlen(charSrc)+1;886 894 charSrc += strlen(charSrc)+1; 895 continue; 887 896 888 897 // copy string until termination 889 //while (*charSrc)890 //*charDest++ = *charSrc++;891 //892 //*charDest++ = *charSrc++;898 // while (*charSrc) 899 // *charDest++ = *charSrc++; 900 // 901 // *charDest++ = *charSrc++; 893 902 } 894 903 895 904 // string types 896 if (string("bsilfdx ").find_first_of(type)==string::npos)905 if (string("bsilfdxc").find_first_of(type)==string::npos) 897 906 throw runtime_error(string("Type '")+type+"' not supported converting to FITS."); 898 907 … … 910 919 } 911 920 912 if (charDest-size!=dest )921 if (charDest-size!=dest/* || charSrc-size!=src*/) 913 922 { 914 923 ostringstream err;
Note:
See TracChangeset
for help on using the changeset viewer.