From 4571ce36d5b6b6fa8b8757f1368283472042c397 Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Thu, 13 Feb 2014 01:47:08 -0500 Subject: [PATCH] fix bug in json file loading, see issue #8 --- src/io/json.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/io/json.cpp b/src/io/json.cpp index d4d488a..37f349b 100644 --- a/src/io/json.cpp +++ b/src/io/json.cpp @@ -6,6 +6,8 @@ #include #include //#include +#include +#include namespace fc { @@ -585,8 +587,10 @@ namespace fc } variant json::from_file( const fc::path& p ) { - auto tmp = std::make_shared( p, ifstream::binary ); - buffered_istream bi( tmp ); + //auto tmp = std::make_shared( p, ifstream::binary ); + //auto tmp = std::make_shared( p.generic_string().c_str(), std::ios::binary ); + //buffered_istream bi( tmp ); + std::ifstream bi( p.generic_string().c_str(), std::ios::binary ); return variant_from_stream( bi ); } variant json::from_stream( buffered_istream& in )