From 4bb8bf7832b29a3be6f3c1ef1002e11ffbd11270 Mon Sep 17 00:00:00 2001 From: Peter Conrad Date: Tue, 6 Mar 2018 22:47:59 +0100 Subject: [PATCH] Fixed relaxed parser wrt "" input --- include/fc/io/json_relaxed.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/fc/io/json_relaxed.hpp b/include/fc/io/json_relaxed.hpp index dd6db73..36f11c8 100644 --- a/include/fc/io/json_relaxed.hpp +++ b/include/fc/io/json_relaxed.hpp @@ -104,8 +104,15 @@ namespace fc { namespace json_relaxed if( in.peek() == q ) { in.get(); - if( in.peek() != q ) - return fc::string(); + try + { + if( in.peek() != q ) + return fc::string(); + } + catch( const fc::eof_exception& e ) + { + return fc::string(); + } // triple quote processing if( strict )