Skip to content

Commit 180d050

Browse files
committed
Open files in binary mode. Closes #3948
1 parent dc5b0b9 commit 180d050

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/libstd/io.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ pub fn stdin() -> @Reader {
10411041

10421042
pub fn file_reader(path: &Path) -> Result<@Reader, ~str> {
10431043
let f = do path.to_str().as_c_str |pathbuf| {
1044-
do "r".as_c_str |modebuf| {
1044+
do "rb".as_c_str |modebuf| {
10451045
unsafe { libc::fopen(pathbuf, modebuf as *libc::c_char) }
10461046
}
10471047
};

0 commit comments

Comments
 (0)