diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-28 16:05:09 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-28 16:05:09 -0400 |
| commit | 9da5949b953ae5424afb77ff4280399eacf414d4 (patch) | |
| tree | 4db2b1ec3abe4f4e63d0fd57c3efbf588c8f92f4 /src/stdlib/integers.c | |
| parent | a49610246e12d8e2947f8ce2bc981acbbb88a901 (diff) | |
Remove remaining printf references
Diffstat (limited to 'src/stdlib/integers.c')
| -rw-r--r-- | src/stdlib/integers.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/stdlib/integers.c b/src/stdlib/integers.c index 86cdeb56..7250e2a2 100644 --- a/src/stdlib/integers.c +++ b/src/stdlib/integers.c @@ -32,11 +32,10 @@ static inline Text_t _int64_to_text(int64_t n) char *p = &buf[19]; bool negative = n < 0; - if (n == 0) - *(p--) = '0'; - - for (; n > 0; n /= 10) + do { *(p--) = '0' + (n % 10); + n /= 10; + } while (n > 0); if (negative) *(p--) = '-'; |
