From 153d3f0433fc054839c0a7c07cb85b47773b70f9 Mon Sep 17 00:00:00 2001 From: Scott Howard Date: Sun, 5 Jul 2015 15:44:32 -0400 Subject: [PATCH] Fix cryptonomex/graphene#107: Define char as signed when comparing against EOF --- include/fc/io/json_relaxed.hpp | 2 +- src/io/json.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fc/io/json_relaxed.hpp b/include/fc/io/json_relaxed.hpp index 2422db3..a3793a4 100644 --- a/include/fc/io/json_relaxed.hpp +++ b/include/fc/io/json_relaxed.hpp @@ -689,7 +689,7 @@ namespace fc { namespace json_relaxed { skip_white_space(in); variant var; - while( char c = in.peek() ) + while( signed char c = in.peek() ) { switch( c ) { diff --git a/src/io/json.cpp b/src/io/json.cpp index 84446e1..b3f57cc 100644 --- a/src/io/json.cpp +++ b/src/io/json.cpp @@ -390,7 +390,7 @@ namespace fc { skip_white_space(in); variant var; - while( char c = in.peek() ) + while( signed char c = in.peek() ) { switch( c ) {