]> git.lizzy.rs Git - rust.git/commitdiff
Fix bug #17982.
authorVadim Chugunov <vadimcn@gmail.com>
Sun, 26 Oct 2014 00:37:41 +0000 (17:37 -0700)
committerVadim Chugunov <vadimcn@gmail.com>
Sun, 26 Oct 2014 00:37:41 +0000 (17:37 -0700)
src/libterm/win.rs

index 0aae85503d07ddaf5647950e410a1762c029f871..d4f06403c1a6e6bd02c9ffec821197f94ddc4fe1 100644 (file)
@@ -71,7 +71,8 @@ fn color_to_bits(color: color::Color) -> u16 {
 }
 
 fn bits_to_color(bits: u16) -> color::Color {
-    let color = match bits & 0x7 {
+    let bits = bits & 0x7;
+    let color = match bits {
         0 => color::BLACK,
         0x1 => color::BLUE,
         0x2 => color::GREEN,