We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e65904 commit d813cefCopy full SHA for d813cef
lib/std/fmt/errol.zig
@@ -169,7 +169,8 @@ fn errolSlow(val: f64, buffer: []u8) FloatDecimal {
169
170
// digit generation
171
var buf_index: usize = 0;
172
- while (true) {
+ const bound = buffer.len - 1;
173
+ while (buf_index < bound) {
174
var hdig = @floatToInt(u8, @floor(high.val));
175
if ((high.val == @intToFloat(f64, hdig)) and (high.off < 0)) hdig -= 1;
176
0 commit comments