Use colon in "%YAML:1.0" directive when persisting to YAML-files

In YAML 1.0 the colon is mandatory. See http://yaml.org/spec/1.0/#id2558635.

This also allows prior releases to read YAML files created with the current version.
This commit is contained in:
fegorsch
2016-10-25 18:18:35 +02:00
parent dc9602ee84
commit ddf0554fff
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -4332,7 +4332,7 @@ cvOpenFileStorage( const char* query, CvMemStorage* dststorage, int flags, const
else if( fs->fmt == CV_STORAGE_FORMAT_YAML )
{
if( !append )
icvPuts( fs, "%YAML 1.0\n---\n" );
icvPuts( fs, "%YAML:1.0\n---\n" );
else
icvPuts( fs, "...\n---\n" );
fs->start_write_struct = icvYMLStartWriteStruct;