Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit a7d8612

Browse files
committed
Fix 'arithmetic operation overflowed' panic in json::Parser::decode_hex_escape
The overflow was introduced accidentally in 49d4958 and happened to cancel out.
1 parent dcd9ad3 commit a7d8612

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/json.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1585,7 +1585,7 @@ impl<T: Iterator<Item = char>> Parser<T> {
15851585

15861586
fn decode_hex_escape(&mut self) -> Result<u16, ParserError> {
15871587
let mut i = 0;
1588-
let mut n = 016;
1588+
let mut n = 0;
15891589
while i < 4 && !self.eof() {
15901590
self.bump();
15911591
n = match self.ch_or_null() {

0 commit comments

Comments
 (0)