From bedeb0d8ea55e19eda1b99c215a0089f5b2375a0 Mon Sep 17 00:00:00 2001 From: "miloyip@gmail.com" Date: Tue, 6 Dec 2011 04:28:36 +0000 Subject: [PATCH] Fixed issue 6: range check bug git-svn-id: https://rapidjson.googlecode.com/svn/trunk@51 c5894555-1306-4e8d-425f-1f6f381ee07c --- include/rapidjson/reader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rapidjson/reader.h b/include/rapidjson/reader.h index 955886e..44f25d5 100644 --- a/include/rapidjson/reader.h +++ b/include/rapidjson/reader.h @@ -418,7 +418,7 @@ private: if (c == '\\') { // Escape is.Take(); Ch e = is.Take(); - if ((sizeof(Ch) == 1 || e < 256) && escape[(unsigned char)e]) + if ((sizeof(Ch) == 1 || unsigned(e) < 256) && escape[(unsigned char)e]) os.Put(escape[(unsigned char)e]); else if (e == 'u') { // Unicode unsigned codepoint = ParseHex4(is);