Browse Source

Minor fixes.

pull/62/merge
rstam 14 years ago
parent
commit
15fb7bb3a7
  1. 2
      Bson/IO/JsonReader.cs
  2. 2
      Bson/IO/JsonScanner.cs

2
Bson/IO/JsonReader.cs

@ -934,7 +934,7 @@ namespace MongoDB.Bson.IO {
VerifyToken(":");
var valueToken = PopToken();
long value;
if (valueToken.Type == JsonTokenType.Int32 && valueToken.Type == JsonTokenType.Int64) {
if (valueToken.Type == JsonTokenType.Int32 || valueToken.Type == JsonTokenType.Int64) {
value = valueToken.Int64Value;
} else if (valueToken.Type == JsonTokenType.UnquotedString && valueToken.Lexeme == "NumberLong") {
value = ParseNumberLong().AsInt64;

2
Bson/IO/JsonScanner.cs

@ -395,7 +395,7 @@ namespace MongoDB.Bson.IO {
}
break;
default:
if (c != -1) {
if (c != -1) {
var message = string.Format("Invalid escape sequence in JSON string '\\{0}'.", (char) c);
throw new FileFormatException(message);
}

Loading…
Cancel
Save