Fix uint/u64 confusion

Causes a failure on 32-bit platforms
This commit is contained in:
Marijn Haverbeke 2012-02-22 13:44:55 +01:00
parent 1e5266260a
commit a3b655f8e3

View File

@ -122,7 +122,7 @@ fn from_str(buf: str, radix: u64) -> option<u64> {
let i = str::len_bytes(buf) - 1u;
let power = 1u64, n = 0u64;
while true {
alt char::to_digit(buf[i] as char, radix) {
alt char::to_digit(buf[i] as char, radix as uint) {
some(d) { n += d as u64 * power; }
none { ret none; }
}