Commit f6b3754f authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

handle empty YAML's correctly (ticket #1127)

parent 38221286
...@@ -1319,6 +1319,8 @@ icvYMLParse( CvFileStorage* fs ) ...@@ -1319,6 +1319,8 @@ icvYMLParse( CvFileStorage* fs )
CV_PARSE_ERROR( "The YAML streams must start with '---', except the first one" ); CV_PARSE_ERROR( "The YAML streams must start with '---', except the first one" );
break; break;
} }
else if( fs->dummy_eof )
break;
else else
CV_PARSE_ERROR( "Invalid or unsupported syntax" ); CV_PARSE_ERROR( "Invalid or unsupported syntax" );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment