You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * Convert a string to I64, finishing when a non-numeric character is * encountered.*/I64StrToI64(U8 *str)
{
I64 total = 0;
for (I64 i = 0; str[i] >= '0' && str[i] <= '9'; i++)
{
total *= 10(I64);
total += (str[i] - '0')(I64);
"%u\n", total;
}
return total;
}
U0Main()
{
"5489811661987 | %u\n",StrToI64("5489811661987");
}
The values appear to be treated as an I32 instead of an I64.
Did some fiddling, and the values seem to be correct internally, so it is only when they are printed that it becomes a problem, so my guess is that the format strings need to be fixed.
Ah so the "%<format>\n", <value> under the hood uses C's printf so in your instance above %lld would do the trick. I'm aware this is less than ideal however it was the simplest way to get it working
Consider the following program:
The values appear to be treated as an
I32
instead of anI64
.The text was updated successfully, but these errors were encountered: