-Fixed JToken Load and Parse methods not checking for incomplete content

This commit is contained in:
JamesNK
2010-12-27 10:06:35 +00:00
parent 1297d64457
commit f32e1f53c5
7 changed files with 95 additions and 23 deletions
+1 -4
View File
@@ -185,10 +185,7 @@ namespace Newtonsoft.Json.Linq
JConstructor c = new JConstructor((string)reader.Value);
c.SetLineInfo(reader as IJsonLineInfo);
if (!reader.Read())
throw new Exception("Error reading JConstructor from JsonReader.");
c.ReadContentFrom(reader);
c.ReadTokenFrom(reader);
return c;
}