diff options
| author | Laytan <laytanlaats@hotmail.com> | 2025-01-29 07:28:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-29 07:28:40 +0100 |
| commit | 5ebc31edcb9da281351e2ef2a0f6efbf2e6996ae (patch) | |
| tree | c47a907360a8931491a3fc172a5134f38dce490e | |
| parent | 0e27acd7551fe49f48fbdea55c2645097af3b0b4 (diff) | |
| parent | 26f9688c69caa1ea8211da7ef072ea6ec292d8f7 (diff) | |
Merge pull request #4580 from tf2spi/4485-fix-exact-value-float
Fix parsing of integer w/ 'e' notation
| -rw-r--r-- | src/big_int.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/big_int.cpp b/src/big_int.cpp index 8e476f090..0b0a9a400 100644 --- a/src/big_int.cpp +++ b/src/big_int.cpp @@ -251,7 +251,10 @@ gb_internal void big_int_from_string(BigInt *dst, String const &s, bool *success exp *= 10; exp += v; } - big_int_exp_u64(dst, &b, exp, success); + BigInt tmp = {}; + mp_init(&tmp); + big_int_exp_u64(&tmp, &b, exp, success); + big_int_mul_eq(dst, &tmp); } if (is_negative) { |