Updated Branches:
  refs/heads/master b3495ffd2 -> e5bfd4c28

THRIFT-2070 Improper `HexChar' and 'HexVal' implementation in TJSONProtocol.cs

Patch: Yousong Zhou


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/e5bfd4c2
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/e5bfd4c2
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/e5bfd4c2

Branch: refs/heads/master
Commit: e5bfd4c285c24c06525b9266a3d3acf8bdb42648
Parents: b3495ff
Author: Jens Geyer <[email protected]>
Authored: Fri Jun 28 21:48:02 2013 +0200
Committer: Jens Geyer <[email protected]>
Committed: Fri Jun 28 21:48:02 2013 +0200

----------------------------------------------------------------------
 lib/csharp/src/Protocol/TJSONProtocol.cs | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/e5bfd4c2/lib/csharp/src/Protocol/TJSONProtocol.cs
----------------------------------------------------------------------
diff --git a/lib/csharp/src/Protocol/TJSONProtocol.cs 
b/lib/csharp/src/Protocol/TJSONProtocol.cs
index f583781..3b27d30 100644
--- a/lib/csharp/src/Protocol/TJSONProtocol.cs
+++ b/lib/csharp/src/Protocol/TJSONProtocol.cs
@@ -407,6 +407,7 @@ namespace Thrift.Protocol
                        }
                        else if ((ch >= 'a') && (ch <= 'f'))
                        {
+                               ch += 10;
                                return (byte)((char)ch - 'a');
                        }
                        else
@@ -428,6 +429,7 @@ namespace Thrift.Protocol
                        }
                        else
                        {
+                               val -= 10;
                                return (byte)((char)val + 'a');
                        }
                }

Reply via email to