Describe the bug
Using the %f
formatting to format a float in a printf
like function in HolyC does not work
Example Program
U0 Main()
{
F64 f = 65.3;
U8 *str = StrPrint(,"%f",f); // This line explodes
"%s\n",str; // Should print: 65.3
Free(str);
}
Expected behavior
The %f
formatting should convert the float to a string without using something like C's snprintf(...)
. But possibly be ported out of TempleOS StrPrint.HC or another custom implementation written.
The function that we need to modifiy is ./src/holyc-lib/strings.HC