about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2011-12-07 07:21:07 -0800
committerNiko Matsakis <niko@alum.mit.edu>2011-12-07 07:35:25 -0800
commit6c95e400d82699887b66f5de0fef2bb5e1f8cc32 (patch)
tree2b3cdfc2df4c3f1d4a8b7186e3647b3fdd72c6aa /src/libstd
parent03a6e542126b755a9cd2f4f56144107ba0f4d1cd (diff)
downloadrust-6c95e400d82699887b66f5de0fef2bb5e1f8cc32.tar.gz
rust-6c95e400d82699887b66f5de0fef2bb5e1f8cc32.zip
repair more hash functions
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/str.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/str.rs b/src/libstd/str.rs
index 2bae8d699a5..521dc33758e 100644
--- a/src/libstd/str.rs
+++ b/src/libstd/str.rs
@@ -324,7 +324,7 @@ fn char_range_at(s: str, i: uint) -> {ch: char, next: uint} {
     // Clunky way to get the right bits from the first byte. Uses two shifts,
     // the first to clip off the marker bits at the left of the byte, and then
     // a second (as uint) to get it to the right position.
-    val += (b0 << (w + 1u as u8) as uint) << (w - 1u) * 6u - w - 1u;
+    val += (b0 << (w + 1u as u8) as uint) << ((w - 1u) * 6u - w - 1u);
     ret {ch: val as char, next: i};
 }