X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=int64.c;h=8a1cda1a5fddc274816a133ba7aabf7ce1e0dba3;hb=49d2cf19accb059b3b68d1fc2b78e606a578c3e8;hp=7997114aefde667a2e58ce3535feff1b1d487eda;hpb=9c5951ed35cf9019bf17685b4356212eae1a63b3;p=PuTTY.git 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';