Skip to content

Commit c388b95

Browse files
committed
---
yaml --- r: 188326 b: refs/heads/master c: 7c8edab h: refs/heads/master v: v3
1 parent c7f0261 commit c388b95

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: c8db89aa82573b89481fde598da6e54371f266cb
2+
refs/heads/master: 7c8edabac8030889f4a885b944c86190772953fd
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
55
refs/heads/try: 649d35e4d830b27806705dc5352c86ab6d6fd1a1

trunk/src/libserialize/json.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,8 +1569,8 @@ impl<T: Iterator<Item=char>> Parser<T> {
15691569
while !self.eof() {
15701570
match self.ch_or_null() {
15711571
c @ '0' ... '9' => {
1572-
accum *= 10;
1573-
accum += (c as u64) - ('0' as u64);
1572+
accum = accum.wrapping_mul(10);
1573+
accum = accum.wrapping_add((c as u64) - ('0' as u64));
15741574

15751575
// Detect overflow by comparing to the last value.
15761576
if accum <= last_accum { return self.error(InvalidNumber); }

0 commit comments

Comments
 (0)