Skip to content

Commit

Permalink
v1.2.3 fix overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed Jun 1, 2024
1 parent 8c13521 commit 4d0e2db
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ato-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ato-cli"
version = "1.2.2"
version = "1.2.3"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion ato/src/mesh/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ impl Data {
let lh: u128 = u128::from_str_radix(&_lh, 16).unwrap();
let rh: u128 = u128::from_str_radix(&_rh, 16).unwrap();

format!("{:x}", lh+rh)
format!("{:032x}", lh+rh)
}
}
10 changes: 10 additions & 0 deletions mdsum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
x1 = "8dcbafa1779616565ad430bc834b9389"
x2 = "7b2d78d14c26df82827bd98d057a78cd"
val = "08f92872c3bcf5d8dd500a4988c60c56"

c1 = int(x1, 16)
c2 = int(x2, 16)
c = (c1 + c2) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

z = format(c, '032x')
print(z)

0 comments on commit 4d0e2db

Please sign in to comment.