From 1b53b92267b68645d857d68bf12d054d7a5ea5d3 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 22 Jan 2013 14:28:15 +0100 Subject: [PATCH] Buffer: check that newlines are at the end of lines --- src/buffer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/buffer.cc b/src/buffer.cc index 12597b691..d74af40cc 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -238,6 +238,7 @@ void Buffer::check_invariant() const assert(line.start == start); assert(line.length() > 0); assert(line.content.back() == '\n'); + assert(find(line.content, '\n') == line.content.end()-1); start += line.length(); } }