TMPro SetText with format incorrectly shows leading zero for some ints

Hi!

Right now some big ints get an incorrect leading zero.

The code Label.SetText("{0}", 99999); shows 099999.

Adding more nines at line TMP_Text.cs:3390 fixes it for my case.

} while (number > 0.999d);
// Change To:
} while (number > 0.999999999999999999999999999d);

I’m running version 2.0.1

PD: Can you version control changes to packages?

I’ve recently hit exactly the same issue. Would love to have this fix rolled up in the official package since maintaining local changes to a package is very fragile and difficult to distribute.

I made the following change which will be in the next release.

do
{
    m_input_CharArray[i++] = (char)(number % 10 + 48);
    number /= 10;
    integralCount += 1;
} while (number > 0.999999999999999d || integralCount < padding);