From 503b9033e80553412548dc653770848badc6b741 Mon Sep 17 00:00:00 2001 From: dnotestein Date: Thu, 27 Feb 2014 21:56:46 -0500 Subject: [PATCH] fix infinite loop in windows when trying to read json variant from empty file --- src/io/json.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/io/json.cpp b/src/io/json.cpp index 37f349b..38c4fca 100644 --- a/src/io/json.cpp +++ b/src/io/json.cpp @@ -338,6 +338,7 @@ namespace fc case 'f': return token_from_stream( in ); case 0x04: // ^D end of transmission + case EOF: FC_THROW_EXCEPTION( eof_exception, "unexpected end of file" ); default: // ilog( "unhandled char '${c}' int ${int}", ("c", fc::string( &c, 1 ) )("int", int(c)) );