From b234eafbf2f922c20138de343de2fd2dc5008902 Mon Sep 17 00:00:00 2001 From: Dan Carter Date: Fri, 4 Nov 2016 13:33:05 -0400 Subject: [PATCH] Fix return type for SByte and SByteNullable in ToObject --- Src/Newtonsoft.Json/Linq/JToken.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Newtonsoft.Json/Linq/JToken.cs b/Src/Newtonsoft.Json/Linq/JToken.cs index 06d4a3c8..2a2818a5 100644 --- a/Src/Newtonsoft.Json/Linq/JToken.cs +++ b/Src/Newtonsoft.Json/Linq/JToken.cs @@ -1970,9 +1970,9 @@ namespace Newtonsoft.Json.Linq case PrimitiveTypeCode.Char: return (char)this; case PrimitiveTypeCode.SByte: - return (sbyte?)this; - case PrimitiveTypeCode.SByteNullable: return (sbyte)this; + case PrimitiveTypeCode.SByteNullable: + return (sbyte?)this; case PrimitiveTypeCode.ByteNullable: return (byte?)this; case PrimitiveTypeCode.Byte: