From 52ee8b46ae866c59339810cac030c7f64472537d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 26 Nov 2012 13:36:43 +0100 Subject: [PATCH] fix crlf file reading --- src/file.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file.cc b/src/file.cc index 24971175..2aedb67b 100644 --- a/src/file.cc +++ b/src/file.cc @@ -119,7 +119,7 @@ Buffer* create_buffer_from_file(const String& filename) lines.emplace_back(pos, line_end + 1); lines.back().back() = '\n'; - if (line_end+1 != end and *line_end == '\r' and *line_end+1 == '\n') + if (line_end+1 != end and *line_end == '\r' and *(line_end+1) == '\n') { crlf = true; pos = line_end + 2;