From c53ed53659f6fbbc1257ee028d4b6e8f06193fdb Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 5 Apr 2019 13:51:28 -0700 Subject: Fix float with invalid suffix. --- src/de.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/de.rs b/src/de.rs index 6b7c43b..b23f03f 100644 --- a/src/de.rs +++ b/src/de.rs @@ -1396,6 +1396,8 @@ impl<'a> Deserializer<'a> { return Err(self.error(start, ErrorKind::NumberInvalid)); } exponent = Some(a); + } else if !suffix.is_empty() { + return Err(self.error(start, ErrorKind::NumberInvalid)); } let mut number = integral -- cgit v1.2.3