aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2019-08-23 09:55:15 -0700
committerAlex Crichton <alex@alexcrichton.com>2019-08-23 09:55:15 -0700
commit994b0e2fcb762bfbde2121a2baedd533d97a2475 (patch)
tree883a0088c07f3b2efa494a2348297f0b28f667ac /src
parent4951dc400c1beda4cba25fe72d733a24758063f7 (diff)
downloadmilf-rs-994b0e2fcb762bfbde2121a2baedd533d97a2475.tar.gz
milf-rs-994b0e2fcb762bfbde2121a2baedd533d97a2475.zip
Allow zero-prefixed float exponents. (#322)
Diffstat (limited to 'src')
-rw-r--r--src/de.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/de.rs b/src/de.rs
index 4c3acc5..f9a3a4c 100644
--- a/src/de.rs
+++ b/src/de.rs
@@ -1436,11 +1436,11 @@ impl<'a> Deserializer<'a> {
let (a, b) = if suffix.len() == 1 {
self.eat(Token::Plus)?;
match self.next()? {
- Some((_, Token::Keylike(s))) => self.parse_integer(s, false, false, 10)?,
+ Some((_, Token::Keylike(s))) => self.parse_integer(s, false, true, 10)?,
_ => return Err(self.error(start, ErrorKind::NumberInvalid)),
}
} else {
- self.parse_integer(&suffix[1..], true, false, 10)?
+ self.parse_integer(&suffix[1..], true, true, 10)?
};
if b != "" {
return Err(self.error(start, ErrorKind::NumberInvalid));