Skip to content

Commit e5175d4

Browse files
committed
Fix release float printing errors
Fixes #564. Fixes #669. Fixes #928.
1 parent d8ba1bc commit e5175d4

File tree

2 files changed

+202
-201
lines changed

2 files changed

+202
-201
lines changed

std/fmt/errol/index.zig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ fn gethi(in: f64) f64 {
259259
/// Normalize the number by factoring in the error.
260260
/// @hp: The float pair.
261261
fn hpNormalize(hp: &HP) void {
262+
// Required to avoid segfaults causing buffer overrun during errol3 digit output termination.
263+
@setFloatMode(this, @import("builtin").FloatMode.Strict);
264+
262265
const val = hp.val;
263266

264267
hp.val += hp.off;

0 commit comments

Comments
 (0)