From f6b3754f3424c5befa1ee88fdbe7058992f47233 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Wed, 8 Jun 2011 16:13:11 +0000 Subject: [PATCH] handle empty YAML's correctly (ticket #1127) --- modules/core/src/persistence.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/core/src/persistence.cpp b/modules/core/src/persistence.cpp index f6544e9..04528c0 100644 --- a/modules/core/src/persistence.cpp +++ b/modules/core/src/persistence.cpp @@ -1319,6 +1319,8 @@ icvYMLParse( CvFileStorage* fs ) CV_PARSE_ERROR( "The YAML streams must start with '---', except the first one" ); break; } + else if( fs->dummy_eof ) + break; else CV_PARSE_ERROR( "Invalid or unsupported syntax" ); } -- 2.7.4