about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authordarkf <lw9k123@gmail.com>2013-08-04 21:54:24 -0700
committerdarkf <lw9k123@gmail.com>2013-08-04 21:54:24 -0700
commit180d050138bc27958291dda3ea46374e4d115848 (patch)
treeca52c0081583940bbefbb06352b789d84a8f2bd3 /src/libstd
parentdc5b0b94101a1fb9094b62ed1bb1b0be3b073fcc (diff)
downloadrust-180d050138bc27958291dda3ea46374e4d115848.tar.gz
rust-180d050138bc27958291dda3ea46374e4d115848.zip
Open files in binary mode. Closes #3948
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/io.rs b/src/libstd/io.rs
index f750f3f3195..55e60f03ea9 100644
--- a/src/libstd/io.rs
+++ b/src/libstd/io.rs
@@ -1041,7 +1041,7 @@ pub fn stdin() -> @Reader {
 
 pub fn file_reader(path: &Path) -> Result<@Reader, ~str> {
     let f = do path.to_str().as_c_str |pathbuf| {
-        do "r".as_c_str |modebuf| {
+        do "rb".as_c_str |modebuf| {
             unsafe { libc::fopen(pathbuf, modebuf as *libc::c_char) }
         }
     };