Index: trunk/FACT++/src/Converter.cc
===================================================================
--- trunk/FACT++/src/Converter.cc	(revision 11016)
+++ trunk/FACT++/src/Converter.cc	(revision 11017)
@@ -782,9 +782,10 @@
         format.second.first = cnt == 0 ? 1 : cnt;
 
+        /*
         if (strict && t[0]=='C' && cnt>0)
         {
             out << kRed << "Dim doesn't support the format C with N>0!" << endl;
             return FormatList();
-        }
+        }*/
 
         // Check if the format is just C (without a number)
@@ -869,28 +870,18 @@
    for (Converter::FormatList::const_iterator i=fList.begin(); i!=fList.end(); i++)
    {
-//ETIENNE this check fails for very fine cases. Disabled it
-       // FIXME: This is still not really safe
-//       if (charDest-size>=dest)
-//       {
-//           ostringstream err;
-//           err << "Format description [fmt=" << fFormat << "] exceeds available data size (" << size << ")";
-//           throw runtime_error(err.str());
-//       }
+       if (charDest-size>dest)
+       {
+           ostringstream err;
+           err << "Format description [fmt=" << fFormat << "] exceeds available data size (" << size << ")";
+           throw runtime_error(err.str());
+       }
 
        const char type = i->first.first->name()[0];
+       if (type=='v')
+           break;
 
        // string types
-       if (type=='S' || type=='O' || type=='W')
-       {
-           // copy string until termination
-           while (*charSrc)
-               *charDest++ = *charSrc++;
-
-           // Copy \0-termination
-//ETIENNE: Do not copy the \0 as it must not be written to fits files. just increment charSrc instead
- //          *charDest++ = *charSrc++;
- 			charSrc++;
-           continue;
-       }
+       if (string("bsilfdx").find_first_of(type)==string::npos)
+           throw runtime_error(string("Type '")+type+"' not supported converting to FITS.");
 
        const int s = i->first.second;      // size of element
@@ -917,7 +908,7 @@
 vector<char> Converter::ToFits(const void *src, size_t size) const
 {
-   vector<char> dest(size);
-   ToFits(&dest[0], src, size);
-   return dest;
+    vector<char> dest(size);
+    ToFits(dest.data(), src, size);
+    return dest;
 }
 
