Skip to content

Commit 50b4ff8

Browse files
committed
---
yaml --- r: 2237 b: refs/heads/master c: 73044b3 h: refs/heads/master i: 2235: 3009fbd v: v3
1 parent 96c9837 commit 50b4ff8

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 031e86ca2d3f070d22d6efbebe42e75d606503b3
2+
refs/heads/master: 73044b3455b7586557eabbd249023d0a363401d0

trunk/src/lib/_uint.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@ fn parse_buf(vec[u8] buf, uint radix) -> uint {
3737
auto i = _vec.len[u8](buf) - 1u;
3838
auto power = 1u;
3939
auto n = 0u;
40-
while (i >= 0u) {
40+
while (true) {
4141
n += (((buf.(i)) - ('0' as u8)) as uint) * power;
4242
power *= radix;
43-
i -= 1u;
43+
if (i == 0u) { ret n; }
4444
}
45-
ret n;
4645
}
4746

4847
fn to_str(uint num, uint radix) -> str

0 commit comments

Comments
 (0)