about summary refs log tree commit diff
path: root/src/lib
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2010-08-25 13:54:27 -0700
committerGraydon Hoare <graydon@mozilla.com>2010-08-25 13:54:27 -0700
commitc2b6c27d65f09647d95bef39e2feefd767d045c1 (patch)
tree2f396100d75c3ce0e88dba8e9d0cb3597e15552a /src/lib
parentb2b72a08dbd18e384972dd835a93df9167380247 (diff)
downloadrust-c2b6c27d65f09647d95bef39e2feefd767d045c1.tar.gz
rust-c2b6c27d65f09647d95bef39e2feefd767d045c1.zip
Fix edge case in uint->string conversion.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/_uint.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/_uint.rs b/src/lib/_uint.rs
index 897f0da684e..f3a6f935706 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;
     }
   }