From c2b6c27d65f09647d95bef39e2feefd767d045c1 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 25 Aug 2010 13:54:27 -0700 Subject: Fix edge case in uint->string conversion. --- src/lib/_uint.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/_uint.rs') diff --git a/src/lib/_uint.rs b/src/lib/_uint.rs index 897f0da6..f3a6f935 100644 --- a/src/lib/_uint.rs +++ b/src/lib/_uint.rs @@ -61,7 +61,7 @@ fn to_str(mutable uint n, uint radix) -> str let uint r = 1u; if (n > r) { - while ((r*radix) < n) { + while ((r*radix) <= n) { r *= radix; } } -- cgit v1.2.3