Fixed 4 broken ml tests.
authorAndrey Kamaev <no@email>
Fri, 13 Apr 2012 19:39:14 +0000 (19:39 +0000)
committerAndrey Kamaev <no@email>
Fri, 13 Apr 2012 19:39:14 +0000 (19:39 +0000)
modules/ml/src/data.cpp

index 72d7061..9639265 100644 (file)
@@ -217,7 +217,7 @@ int CvMLData::read_csv(const char* filename)
         str_to_flt_elem( token, el_ptr[cols_count-1], type);
         var_types_ptr[cols_count-1] |= type;
         cvSeqPush( seq, el_ptr );
-        if( !fgets_chomp( buf, M, file ) )
+        if( !fgets_chomp( buf, M, file ) || !strchr( buf, delimiter ) )
             break;
     }
     fclose(file);