mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
Fix etc__high_prec_dec__to_f64 shift amount
Shifting 0.299 left by 2 doesn't put us in [½ .. 1].
This commit is contained in:
1 parent
1210340e75
commit
57d47c633c
5 files changed
+37
-14
No files matched your search
@@ -1304,7 +1304,7 @@ wuffs_base__private_implementation__high_prec_dec__to_f64(
|
||||
if (h->digits[0] >= 5) {
|
||||
break;
|
||||
}
|
||||
shift = (h->digits[0] <= 2) ? 2 : 1;
|
||||
shift = (h->digits[0] < 2) ? 2 : 1;
|
||||
} else {
|
||||
uint32_t n = (uint32_t)(-h->decimal_point);
|
||||
shift = (n < num_powers)
|
||||
|
||||
Reference in new issue
Block a user