THRIFT-2070 Improper `HexChar' and 'HexVal' implementation in TJSONProtocol.cs
Patch: Yousong Zhou
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 @@
}
else if ((ch >= 'a') && (ch <= 'f'))
{
+ ch += 10;
return (byte)((char)ch - 'a');
}
else
@@ -428,6 +429,7 @@
}
else
{
+ val -= 10;
return (byte)((char)val + 'a');
}
}