Index: /trunk/FACT++/src/Converter.cc
===================================================================
--- /trunk/FACT++/src/Converter.cc	(revision 11026)
+++ /trunk/FACT++/src/Converter.cc	(revision 11027)
@@ -856,5 +856,14 @@
 }
 
-
+// --------------------------------------------------------------------------
+//
+//! @param dest
+//!    Array to which the destination data is written
+//! @param src
+//!    Array with the source data according to the format stored in the
+//!    Converter
+//! @param size
+//!    size of the destination data in bytes
+//!
 void Converter::ToFits(void *dest, const void *src, size_t size) const
 {
@@ -870,5 +879,5 @@
    for (Converter::FormatList::const_iterator i=fList.begin(); i!=fList.end(); i++)
    {
-       if (charDest-size>dest)
+       if (charDest-size>dest/* || charSrc-size>src*/)
        {
            ostringstream err;
@@ -883,16 +892,16 @@
        if (type=='S')
        {
-           size -= strlen(charSrc)+1;
            charSrc += strlen(charSrc)+1;
+           continue;
 
            // copy string until termination
-//           while (*charSrc)
-//               *charDest++ = *charSrc++;
-//
-//           *charDest++ = *charSrc++;
+           // while (*charSrc)
+           //     *charDest++ = *charSrc++;
+           //
+           // *charDest++ = *charSrc++;
        }
 
        // string types
-       if (string("bsilfdx").find_first_of(type)==string::npos)
+       if (string("bsilfdxc").find_first_of(type)==string::npos)
            throw runtime_error(string("Type '")+type+"' not supported converting to FITS.");
 
@@ -910,5 +919,5 @@
    }
 
-   if (charDest-size!=dest)
+   if (charDest-size!=dest/* || charSrc-size!=src*/)
    {
        ostringstream err;
