Skip to content

Commit

Permalink
Fix corrupt escape sequence in string parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
topeterk committed Aug 10, 2019
1 parent 4b750c4 commit def8c83
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/JsonParser.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//The MIT License (MIT)

//Copyright (c) 2018 Alex Parker
//Copyright (c) 2018 Peter Kirmeier
//Copyright (c) 2018-2019 Peter Kirmeier

//Permission is hereby granted, free of charge, to any person obtaining a copy of
//this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -308,8 +308,7 @@ static object ParseAnonymousValue(string json)
}
if (json[0] == '"' && json[json.Length - 1] == '"')
{
string str = json.Substring(1, json.Length - 2);
return str.Replace("\\", string.Empty);
return ParseValue(typeof(string), json); // fix https://github.com/zanders3/json/issues/29
}
if (char.IsDigit(json[0]) || json[0] == '-')
{
Expand Down

0 comments on commit def8c83

Please sign in to comment.