From d552ad28b726475f1a4f5501baa0cb0b4d7502c9 Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 27 Oct 2008 19:01:56 +0000 Subject: [PATCH] newline-mode binary should also turn off decoding of newlines on read --- dtool/src/dtoolutil/pandaFileStreamBuf.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dtool/src/dtoolutil/pandaFileStreamBuf.cxx b/dtool/src/dtoolutil/pandaFileStreamBuf.cxx index f192dac77a..99c1440230 100644 --- a/dtool/src/dtoolutil/pandaFileStreamBuf.cxx +++ b/dtool/src/dtoolutil/pandaFileStreamBuf.cxx @@ -464,6 +464,11 @@ read_chars(char *start, size_t length) { // The file is opened in text mode. We have to decode newline // characters in the file. + if (_newline_mode == NM_binary) { + // Unless we're configured to always use binary mode. + return read_chars_raw(start, length); + } + char *buffer = (char *)alloca(length); size_t read_length;