c42f / tinyformat

Minimal, type safe printf replacement library for C++
537 stars 75 forks source link

Fix incorrect zero padding of inf and NaN #77

Closed c42f closed 3 years ago

c42f commented 3 years ago

We now follow the rule: if the type is a non-finite floating point type, and the stream fill has been zero padded, then reset it to ' '.

This prevents zero-padded numbers which turn out to be nan/inf from being oddly formatted with leading zeros.

Should fix #76

c42f commented 3 years ago

Should fix #76

nigels-com commented 3 years ago

Looks good!