diff options
Diffstat (limited to 'src/base32.zig')
-rw-r--r-- | src/base32.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base32.zig b/src/base32.zig index 7beb43e..4e79a73 100644 --- a/src/base32.zig +++ b/src/base32.zig | |||
@@ -236,7 +236,7 @@ pub const Decoder = struct { | |||
236 | fn safeMulDiv(a: u64, b: u64, c: u64) u64 { | 236 | fn safeMulDiv(a: u64, b: u64, c: u64) u64 { |
237 | const q = a / c; | 237 | const q = a / c; |
238 | const r = a % c; | 238 | const r = a % c; |
239 | // (a * b) + (r * b) / c; | 239 | // (a * b) / c == (a / c) * b + ((a % c) * b) / c |
240 | return (q * b) + (r * b) / c; | 240 | return (q * b) + (r * b) / c; |
241 | } | 241 | } |
242 | 242 | ||