X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/d92624dccee63e8bee8653e8ae845ffad3490b67..04f1c8e7049f071302dc8fe596487012f898dd08:/int64.c diff --git a/int64.c b/int64.c index 7997114a..8a1cda1a 100644 --- a/int64.c +++ b/int64.c @@ -36,11 +36,11 @@ void uint64_decimal(uint64 x, char *buffer) int start = 20; int d; - while (x.hi || x.lo) { + do { x = uint64_div10(x, &d); assert(start > 0); buf[--start] = d + '0'; - } + } while (x.hi || x.lo); memcpy(buffer, buf + start, sizeof(buf) - start); buffer[sizeof(buf) - start] = '\0';